26 lines
516 B
PHP
26 lines
516 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Http\Request;
|
|
use App\Stores;
|
|
|
|
class StoreController extends Controller
|
|
{
|
|
// Stores
|
|
public function index(){
|
|
return Stores::all();
|
|
}
|
|
|
|
public function show($id){
|
|
return Stores::find($id);
|
|
}
|
|
|
|
// 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();
|
|
|
|
}
|
|
}
|