public function store(Request $request)
 {
     //dd($request->all());
     $roster = new Roster();
     $roster->course_id = $request->input('course_id');
     $roster->user_id = $request->input('user_id');
     $roster->save();
     return redirect('courses');
 }
Beispiel #2
0
 public function toggleRosterStatus(Roster $roster)
 {
     $roster->status = $roster->status == 'open' ? 'closed' : 'open';
     $roster->save();
     return $this->respond($roster);
 }