laravel route multiple methods

35

$router->get('/{home?}', 'SiteController@home')
       ->where('home', '(home|another_home_route)')
       ->name('home');
Route::match(['get', 'post'], '/user', [
    'uses' => 'AppController@user',
    'as'   => 'useraccess',
    'roles'=> 'HomeController@useroles', 
]);

Comments

Submit
0 Comments