thebadspace/app/Http/Controllers/LocationController.php

29 lines
596 B
PHP
Raw Normal View History

<?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'
);
}
}