/**
  * 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'));
 }
 /**
  * Store a newly created Profile in storage.
  * POST /profiles
  *
  * @param Request $request
  *
  * @return Response
  */
 public function store(Request $request)
 {
     if (sizeof(Profile::$rules) > 0) {
         $this->validateRequestOrFail($request, Profile::$rules);
     }
     $input = $request->all();
     $profiles = $this->profileRepository->create($input);
     return $this->sendResponse($profiles->toArray(), "Profile saved successfully");
 }
Example #3
0
 /**
  * POST: /profiles
  *
  * @return redirect(/profiles)
  */
 public function postIndex()
 {
     $profileName = Input::get('profile_name');
     $this->profileRepository->create(Auth::user()->id, $profileName);
     return redirect('/profiles');
 }