/** * 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')); }
public function searchMaterial(Request $request) { $this->validate($request, ['valueSearch' => 'required', 'radioSearch' => 'required']); $param = Input::get('radioSearch'); $searchText = Input::get('valueSearch'); if ($param == "Title") { $results = Material::where('title', 'LIKE', $searchText . '%')->orderBy('title')->get(); } else { if ($param == "Category") { $results = Material::where('category', 'LIKE', $searchText . '%')->orderBy('category')->get(); } else { $results = Participant::where('keyword', 'LIKE', '%' . $searchText . '%')->orderBy('keyword')->get(); } } return view('crud.material', compact('results')); }
public function deleteRegister(Request $request) { $id = Input::get('modalMSGValue'); Participant::where('name', '=', $id)->delete(); return redirect()->back()->with('info', 'Successfully deleted participant!'); }