Renaming route parameters

parent 0b7071ac
...@@ -54,7 +54,7 @@ $router->group(['prefix' => '/user', 'middleware' => ['api.token', 'auth.admin'] ...@@ -54,7 +54,7 @@ $router->group(['prefix' => '/user', 'middleware' => ['api.token', 'auth.admin']
'uses' => 'UserController@store', 'uses' => 'UserController@store',
'middleware' => 'token-can:user.users.create', 'middleware' => 'token-can:user.users.create',
]); ]);
$router->post('find/{role}', [ $router->post('find/{user}', [
'as' => 'api.user.user.find', 'as' => 'api.user.user.find',
'uses' => 'UserController@find', 'uses' => 'UserController@find',
'middleware' => 'token-can:user.users.edit', 'middleware' => 'token-can:user.users.edit',
...@@ -64,12 +64,12 @@ $router->group(['prefix' => '/user', 'middleware' => ['api.token', 'auth.admin'] ...@@ -64,12 +64,12 @@ $router->group(['prefix' => '/user', 'middleware' => ['api.token', 'auth.admin']
'uses' => 'UserController@findNew', 'uses' => 'UserController@findNew',
'middleware' => 'token-can:user.users.edit', 'middleware' => 'token-can:user.users.edit',
]); ]);
$router->post('{role}/edit', [ $router->post('{user}/edit', [
'as' => 'api.user.user.update', 'as' => 'api.user.user.update',
'uses' => 'UserController@update', 'uses' => 'UserController@update',
'middleware' => 'token-can:user.users.edit', 'middleware' => 'token-can:user.users.edit',
]); ]);
$router->delete('{role}', [ $router->delete('{user}', [
'as' => 'api.user.user.destroy', 'as' => 'api.user.user.destroy',
'uses' => 'UserController@destroy', 'uses' => 'UserController@destroy',
'middleware' => 'token-can:user.users.destroy', 'middleware' => 'token-can:user.users.destroy',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment