How to route GET and POST for same pattern in Laravel?

前端 未结 10 2064
余生分开走
余生分开走 2020-12-24 10:55

Does anyone know of any way in Laravel 4 which combines these 2 lines into one?

Route::get(\'login\', \'AuthControl         


        
10条回答
  •  一个人的身影
    2020-12-24 11:44

    As per the latest docs, it should be

    Route::match(['get', 'post'], '/', function () {
        //
    });
    

    https://laravel.com/docs/routing

提交回复
热议问题