Is there a way in Laravel5 where I could define routes that handles dynamic routes without conflicting with current static routes? Something similar below:
// Dynamic routes
Route::get('{permalink}', function($permalink) {
//look for matching username on the table (bind perhaps?)
});
// Static routes
Route::get('home', 'HomeController@index');
Route::get('products', 'ProductController@index');
I tried something similar above but I keep on getting this error:
Serialization of 'Closure' is not allowed.
Any ideas, guys? Thanks.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire