Does anyone know of any way in Laravel 4 which combines these 2 lines into one?
Route::get(\'login\', \'AuthControl
As per the latest docs, it should be
Route::match(['get', 'post'], '/', function () {
//
});
https://laravel.com/docs/routing
Route::match(array('GET', 'POST', 'PUT'), "/", array(
'uses' => 'Controller@index',
'as' => 'index'
));
The docs say...
Route::match(array('GET', 'POST'), '/', function()
{
return 'Hello World';
});
source: http://laravel.com/docs/routing
Right, I'm answering using my mobile, and so I haven't tested this (if I remember correctly, it isn't in the documentation either). Here goes:
Route::match('(GET|POST)', 'login',
'AuthController@login'
);
That should do the trick. If it doesn't, then Taylor had it removed from the core; which would then mean that nobody was using it.