Beispiel #1
0
 public static function latest($n = 4)
 {
     return QuickLink::orderBy('created_at', 'DESC')->limit($n)->get();
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function publish($slug)
 {
     $quicklink = QuickLink::find($slug);
     $quicklink->update(['is_published' => $quicklink->is_published ? 0 : 1]);
     return Redirect::route('quicklinks.admin');
 }