/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $dados['eventos'] = Evento::where('status', '=', 1)->get(); $dados['imagens'] = Midia::where('id_tipo_midia', '=', $this->tipo_midia)->get(); return view('site/eventos', $dados); }
public function search(Request $request) { $eventos = Evento::where('nombre_evento', 'like', '%' . $request->nombre . '%')->get(); return \View::make('Evento/list_evento', compact('eventos')); }