Skip to content

Instantly share code, notes, and snippets.

@gmsantos
Last active August 29, 2015 14:07
Show Gist options
  • Save gmsantos/feaedd41b7cdaff6304c to your computer and use it in GitHub Desktop.
Save gmsantos/feaedd41b7cdaff6304c to your computer and use it in GitHub Desktop.
Route::* Laravel
<?php
/*
Em vez de :
Route::any('/', function(){
if (Request::getMethod == 'POST'){
// lógica login
return View::('login-sucesso');
}
return View::('login');
});
Tente fazer isso:
*/
Route::get('/', function(){
return View::('login');
});
Route::post('/', function(){
// lógica do login
return View::('login-sucesso');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment