コード例 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index(Request $request)
 {
     $categorias = Categoria::search($request->q)->orderBy('nome')->paginate();
     return view('categorias.index', compact('categorias'));
 }