public function getSchoolSettings() { $school = Schools::find($this->getSchoolId()); $schedule = SchoolSchedule::where('school_id', '=', $this->getschoolId())->where('school_session_id', '=', $this->getSchoolSessionId())->get(); $sessions = SchoolSession::where('school_id', '=', $this->getschoolId())->get(); $current_session = SchoolSession::where('school_id', '=', $this->getschoolId())->where('current_session', '=', 1)->get()->first(); return View::make('admin.school-settings')->with('schedules', $schedule)->with('sessions', $sessions)->with('school', $school)->with('current_session', $current_session); }
public function getSchoolSessions() { $session = SchoolSession::where('school_id', '=', Sentry::getUser()->school_id)->where('current_session', '=', 1)->get()->first(); return View::make('teacher.initial-school-settings')->with('session', $session); }
public function getSetInitial() { $session = SchoolSession::where('school_id', '=', Sentry::getUser()->school_id)->orderBy('session_start', 'desc')->get()->first(); $streams = Streams::where('school_id', '=', Sentry::getUser()->school_id)->get(); return View::make('user.initial-school-settings')->with('session', $session)->with('streams', $streams); }
/** * @return SchoolSessionId */ protected function getSchoolSessionId() { $session = SchoolSession::where('school_id', '=', $this->getschoolId())->where('current_session', '=', 1)->get()->first(); return $this->schoolSessionId = $session->id; }
public function postGetSchoolCurrentSession() { $school_id = Sentry::getUser()->school_id(); $school_session = SchoolSession::where('school_id', '=', $school_id)->where('current_session', '=', 1)->get(); $response = array('status' => 'failed', 'msg' => 'Validation is not Successfull', 'result' => array('school_session' => $school_session)); return Response::json($response); }