eluqont laravel self code example
Example 1: laravel tricks and tips
Route::get('logout', function()
{
Auth::logout();
return Redirect::home();
});
//@sujay
Example 2: laravel tricks and tips
Article::find($article_id)->increment('read_count');
Article::find($article_id)->increment('read_count', 10); // +10
Product::find($produce_id)->decrement('stock'); // -1
//@sujay