forked from projects/thebadspace
ro
573054e7d8
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
29 lines
596 B
PHP
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'
|
|
);
|
|
}
|
|
}
|