コード例 #1
0
 /**
  * Store a newly created Student in storage.
  *
  * @param CreateStudentRequest $request
  *
  * @return Response
  */
 public function store(CreateStudentRequest $request)
 {
     $input = $request->all();
     $student = $this->studentRepository->create($input);
     Flash::success('Student saved successfully.');
     return redirect(route('students.index'));
 }
コード例 #2
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(Requests\CreateStudentRequest $request)
 {
     $data = $request->all();
     $student = new Student($data);
     $student->save();
     return redirect()->route('admin.student.index');
 }
コード例 #3
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(CreateStudentRequest $request)
 {
     $request['password'] = Hash::make(ucfirst(strtolower($request->last_name)) . substr($request->student_number, -3));
     $request['student_group'] = "emphatic";
     Student::create($request->all());
     Auth::loginUsingId($request->student_number);
     $user = Auth::user();
     return Redirect::to('pia/method/manual')->with("user", $user);
 }