How to use route substitution in Laravel . For example: $route['category/(:any)/page/(:num)'] = '/category/page/$1/$2';
- I would sit on the igniter and create my own, why would I reach for the lara? :> - Manitikyl
- @Manitikyl I read that it seems like Codegniter is safe in safety - ruslan4742
- oneread less, with security in all frames everything is fine, they differ only in their worldview, architecture and spikes. - Manitikyl
- @Manitikyl Thanks for the tip - ruslan4742
|
1 answer
Something like this:
Route::any('category/{id}/page/{page}', 'CategoryController@show')->where('page', '[0-9]+'); And the controller itself:
<?php namespace App\Http\Controllers; use App\User; use App\Http\Controllers\Controller; class CategoryController extends Controller { public function show($id, $page) { return; } } |