function old(Request $request) { $id = $request['id']; if ($id == null) { $id = get_current_conference_id(); } $conferences = Conference::where('id', '<>', get_current_conference_id())->orderBy('id', 'desc')->get(); $chosen_conf = Conference::where('id', '=', $id)->first(); $presentations = Presentation::where('conference_id', '=', $id)->where('status', '=', 'A')->orderBy('course_id')->get(); return view('conferences.old', compact('conferences', 'chosen_conf', 'presentations')); }
protected function deletePresentation($id, $presentationId) { if ($id == null || $presentationId == null) { return Response::json('invalid ids', 400); } $Presentation = Presentation::where('Project_FK', '=', $id)->where('id', '=', $presentationId)->first(); if (empty($Presentation)) { return Response::json('presentation is empty', 400); } \File::Delete(public_path() . "\\presentations\\" . $Presentation->file); $Presentation->delete(); }
function count_presentations() { $id = get_current_conference_id(); return Presentation::where('conference_id', '=', $id)->count(); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index($status = "Approved") { $status = strtoupper($status[0]); $presentations = Presentation::where('conference_id', '=', get_current_conference_id())->where('status', '=', $status)->orderBy('course_id')->get(); return view('presentations.index', compact('presentations', 'status')); }
public function preview() { $rooms = Room::where("available", true)->get(); $days = Timeslot::orderBy("id", 'desc')->first()->day; $presentations = Presentation::where('conference_id', '=', get_current_conference_id())->whereNotNull('timeslot')->get(); $timeslots = Timeslot::where('conference_id', '=', get_current_conference_id())->get(); return view('timeslots.preview', compact('timeslots', 'rooms', 'presentations', 'days')); }