Within my application i was working with the following route:
Route::get('router', ['as' => 'router.index', 'uses' => 'RouterController@index']);
For the purposes of using Datatables
, the route has to be defined differently.
Route::controller('router', 'RouterController', [
'dataTablesData' => 'datatables.data',
'index' => 'router',
]);
This causes my application to crash due to the missing 'as' => 'router.index'
. Where should I place the as
parameter in a Route::controller
?
Route::controller(
'router',
'RouterController',
array(
'index' => 'router.index',
)
);
try something like that?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.