Short & Easy way to define route in Laravel:
In Laravel 4.2, Genrallay we define any route like this:
Route::post('/sign-in', 'UserController@signIn');
OR
Route::get('/sign-in', 'UserController@signIn');
In Laravel 5.1 we can write route like this & also can write a different method.
We don't need to write 'Route::' for define any route. We can simply write it down as
post('/sign-in', 'UserController@signIn');
OR
get('/sign-in', 'UserController@signIn');
Thanks
In Laravel 4.2, Genrallay we define any route like this:
Route::post('/sign-in', 'UserController@signIn');
OR
Route::get('/sign-in', 'UserController@signIn');
In Laravel 5.1 we can write route like this & also can write a different method.
We don't need to write 'Route::' for define any route. We can simply write it down as
post('/sign-in', 'UserController@signIn');
OR
get('/sign-in', 'UserController@signIn');
Thanks
No comments:
Post a Comment