Is it possible to pass a route parameter to a controller to then pass to a view in laravel?
Example;
I have the route below;
Route::get('post/{id}/{name}', 'BlogController@post')->name('blog-post');
I want to pass {id} and {name} to my view so in my controller
class BlogController extends Controller
{
//
public function post () {
//get id and name and pass it to the view
return view('pages.blog.post');
}
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire