function room($roomId) { $data['system'] = $this->system; $room = Classroom::findOrFail($roomId); $data['room_id'] = $roomId; $data['room_name'] = $room->legacycode; $data['location'] = $room->location; $data['days'] = Day::where('id', '!=', 8)->get(); $data['times'] = Time::all(); $schedCollection = new SchedCollection(); $data['table_day'] = $schedCollection->getSchedRoom($roomId, $this->system); return view('edp.room_sched', $data); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $classroom = Classroom::findOrFail($id); $classroom->delete(); return redirect()->route('classrooms.index')->with('message', 'Item deleted successfully.'); }