thebadspace/app/Http/Controllers/LocationController.php
ro 573054e7d8 Cleaned up location controller, responsive fix
The Location Controller was getting too heavy so an Update and
Maintenance service class was created to offload most of it's
functionality. Location upating was moved to LocationRepository

There was also a small issue with responsive list links not adapting
properly in Safari that was fixed
2024-02-15 15:00:03 -06:00

29 lines
596 B
PHP

<?php
namespace App\Http\Controllers;
use App\Services\UpdateService;
class LocationController extends Controller
{
protected $update;
public function __construct(UpdateService $updateService)
{
$this->update = $updateService;
}
public function updateLocations()
{
$result = $this->update->locations();
return back()->with(
'message',
$result['duplicates'] .
' UPDATED - ' . $result['fresh'] .
' CREATED - ' . count($result['missing']) .
' SOURCE(S) NOT CHECKED'
);
}
}