예제 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function getIndex()
 {
     $links = Link::sort()->get();
     if (\Request::has('key')) {
         $key = \Request::input('key');
         $links = Link::where('title', 'like', '%' . $key . '%')->sort()->get();
     }
     return view('admin.link.index', compact('links'));
 }