/**
  * Store a newly created resource in storage.
  *
  * @param CreateProgramRequest|Request $request
  * @return Response
  */
 public function store(CreateProgramRequest $request)
 {
     //
     ProgramsModel::create($request->all());
     $sub1 = new SubjectRequiredModel();
     $sub = new SubjectRequiredModel();
     $sub1->program_code = $request->program_code;
     $sub1->subject_code = $request->required_subject_1;
     $sub1->save();
     $sub->program_code = $request->program_code;
     $sub->subject_code = $request->required_subject_2;
     $sub->save();
     return redirect('admin/programs');
 }
 private function createProgram(CreateProgramRequest $request)
 {
     $program = Programs::create($request->all());
     $this->syncTags($program, $request->input('userlist'));
     return $program;
 }