Some phpcs tweaks
This commit is contained in:
parent
02e3ce42e0
commit
9cc53f9cbf
1 changed files with 9 additions and 3 deletions
|
@ -48,8 +48,14 @@ class PlacesController extends Controller
|
||||||
*/
|
*/
|
||||||
public function store(): RedirectResponse
|
public function store(): RedirectResponse
|
||||||
{
|
{
|
||||||
$data = request()->only(['name', 'description', 'latitude', 'longitude']);
|
$this->placeService->createPlace(
|
||||||
$place = $this->placeService->createPlace($data);
|
request()->only([
|
||||||
|
'name',
|
||||||
|
'description',
|
||||||
|
'latitude',
|
||||||
|
'longitude'
|
||||||
|
])
|
||||||
|
);
|
||||||
|
|
||||||
return redirect('/admin/places');
|
return redirect('/admin/places');
|
||||||
}
|
}
|
||||||
|
@ -95,7 +101,7 @@ class PlacesController extends Controller
|
||||||
public function mergeIndex(int $placeId): View
|
public function mergeIndex(int $placeId): View
|
||||||
{
|
{
|
||||||
$first = Place::find($placeId);
|
$first = Place::find($placeId);
|
||||||
$results = Place::near((object) ['latitude' => $first->latitude, 'longitude' =>$first->longitude])->get();
|
$results = Place::near((object) ['latitude' => $first->latitude, 'longitude' => $first->longitude])->get();
|
||||||
$places = [];
|
$places = [];
|
||||||
foreach ($results as $place) {
|
foreach ($results as $place) {
|
||||||
if ($place->slug !== $first->slug) {
|
if ($place->slug !== $first->slug) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue