I am new in Laravel
. routes/api.php I have written this function
Route::group(['namespace' => "Catalog"],function(){
Route::resource('product','Product');
});
I have created a resource controller:
app/Controllers/Catalogue/Product.php
This is my index method:
public function index()
{
$pdo = DB::select('select count(*) from offers');
return $pdo;
}
I am trying to get the result from index method from url:
http://localhost:8000/api/Catalogue/product
However, this results in 404 not found
. Note: There is no issue in this part of url http://localhost:8000/api
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire