Exemplo n.º 1
0
 public function activityIndex()
 {
     $activities = Activity::orderBy('name')->get();
     $events = Event::orderBy('name')->get();
     $types = Activity::getTypes();
     return view('crud.activity', compact('activities', 'events', 'types'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function bancaIndex()
 {
     //
     $events = Event::orderBy('name')->get();
     $professors = Participant::where('type', 'like', 'professor')->orderBy('name')->get();
     $boards = BancaAvaliadora::orderBy('created_at')->get();
     return view('crud.banca', compact('events', 'professors', 'boards'));
 }
Exemplo n.º 3
0
 public function searchEvent(Request $request)
 {
     $this->validate($request, ['valueSearch' => 'required', 'radioSearch' => 'required']);
     $param = Input::get('radioSearch');
     $searchText = Input::get('valueSearch');
     if ($param == "Name") {
         $events = Event::where('name', 'LIKE', $searchText . '%')->orderBy('name')->get();
     } else {
         $events = Event::where('location', 'LIKE', $searchText . '%')->orderBy('location')->get();
     }
     //dd($events);
     return view('crud.event', compact('events'));
 }