how to make the list can link to other page
Pscontroller enter code here public function show() { $ps = DB::table('ps')->get();
return view('viewps', ['ps' => $ps]);
}
public function view($id) { $ps = Ps::find($id);
// show the view and pass to it
return view ('view')->with('ps', $ps);
}
route
Route::get('/viewps', 'PsController@show'); Route::get('/viewps/{id}', 'PsController@view');
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire