コード例 #1
0
 /**
  * Store a newly created Profile in storage.
  *
  * @param CreateProfileRequest $request
  *
  * @return Response
  */
 public function store(CreateProfileRequest $request)
 {
     $input = $request->all();
     $profile = $this->profileRepository->create($input);
     Flash::success('Profile saved successfully.');
     return redirect(route('profiles.index'));
 }
コード例 #2
0
ファイル: ProfileController.php プロジェクト: skafetzo/SPtool
 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update(CreateProfileRequest $request)
 {
     //validation first
     $request->all();
     $profile = Auth::user()->mecanex_user;
     $profile->name = Input::get('name');
     $profile->surname = Input::get('surname');
     $profile->gender_id = Input::get('gender_id');
     $profile->age_id = Input::get('age_id');
     $profile->occupation_id = Input::get('occupation_id');
     $profile->country_id = Input::get('country_id');
     $profile->education_id = Input::get('education_id');
     //$profile->facebook_account=Input::get('facebook_account');
     //$profile->twitter_account=Input::get('twitter_account');
     $profile->save();
     return Redirect::route('profile.update')->with('message', 'Your profile has been updated');
 }