Esempio n. 1
0
 static function getStudentSchedule()
 {
     $schedules = StudentSchedule::with('Students', 'courses')->get();
     $resultArray = array();
     $i = 0;
     foreach ($schedules as $schedule) {
         $resultArray[$i]['title'] = $schedule->Courses->course_name . ' ' . $schedule->Students->student_name;
         $resultArray[$i]['start'] = $schedule->schedule_date;
         $i++;
     }
     return json_encode($resultArray);
 }
Esempio n. 2
0
 Route::any('getEnrollmetHistory', 'StudentsController@getEnrollmetHistory');
 Route::any('getFollowupByMembershipId', 'CustomersController@getMembershipHistory');
 Route::any('updateMembershipFollowup', 'CustomersController@updateMembershipFollowup');
 Route::any('UpdateRetentionFollowup', 'StudentsController@UpdateRetentionFollowup');
 Route::any('UpdateFollowup', 'StudentsController@UpdateFollowup');
 Route::any('getEvents', "EventsController@getEvents");
 Route::any('getPaymentTypes', "PaymentsController@index");
 Route::any('navigateToProfile', "VaultController@navigateToProfile");
 Route::any('eventTypeById', "EventsController@getEventTypeById");
 Route::any('saveEventType', "EventsController@saveEventType");
 Route::any('getEventById', "EventsController@getEventById");
 Route::any('saveEvent', "EventsController@saveEvent");
 Route::any('saveSchedule', function () {
     $input = Input::all();
     if ($input['studentId'] != "") {
         $studentSchedule = StudentSchedule::addSchedule($input);
         if ($studentSchedule) {
             $status = array("status" => "success");
         }
     }
     header('Access-Control-Allow-Origin: *');
     return Response::json($status);
 });
 Route::any('savecomment', function () {
     $inputs = Input::all();
     $comments = Comments::addComments($inputs);
     header('Access-Control-Allow-Origin: *');
     if ($comments) {
         return Response::json(array("status" => "success"));
     } else {
         return Response::json(array("status" => "failed"));