laravel relationship tricks code example
Example 1: laravel tricks and tips
Route::get('logout', function()
{
Auth::logout();
return Redirect::home();
});
//@sujay
Example 2: laravel tricks and tips
//$user = User::find($id);
//if (!$user) { abort (404); }
//=> do this
$user = User::findOrFail($id);
//@sujay