Example #1
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(CreateSubjectRequest $request)
 {
     $created = $this->subject->create($request->all());
     if ($created) {
         return \Redirect::route('create_subject')->with('message', 'Subject successfuly registered!');
     } else {
         return \Redirect::route('create_subject')->with('error-message', 'Failed to Add Subject!');
     }
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param CreateSubjectRequest|Request $request
  * @return Response
  */
 public function store(CreateSubjectRequest $request)
 {
     //
     SubjectModel::create($request->all());
     return redirect('admin/subjects');
 }