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

前端 未结 10 2078
余生分开走
余生分开走 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:43

    In laravel 5.1 this can be achieved by Implicit Controllers. see what I found from the laravel documentation

    Route::controller('users', 'UserController');
    

    Next, just add methods to your controller. The method names should begin with the HTTP verb they respond to followed by the title case version of the URI:

提交回复
热议问题