ldc-wenn-dann-mit-respekt/app/Http/Controllers/API/StoreController.php

28 lines
500 B
PHP
Raw Normal View History

2022-11-18 12:39:03 +01:00
<?php
namespace App\Http\Controllers;
use App\Stores;
class StoreController extends Controller
{
// Stores
2022-11-18 15:35:39 +01:00
public function index()
{
2022-11-18 12:39:03 +01:00
return Stores::all();
}
2022-11-18 15:35:39 +01:00
public function show($id)
{
2022-11-18 12:39:03 +01:00
return Stores::find($id);
}
2022-11-18 15:35:39 +01:00
// Stores by city
public function city($city)
{
// return Stores::where('city', $city)->first();
// return Stores::where('city', $city)::all;
// return Stores::where('city', '=', $city)->get();
2022-11-18 12:39:03 +01:00
}
}