/** * Save a new status * * @return Response */ public function store() { $this->publishStatusForm->validate(Input::only('body')); $this->execute(new PublishStatusCommand(Input::get('body'), Auth::user()->id)); Flash::message('Your status has been updated!'); return Redirect::refresh(); }
/** * Save a new status * * @return Response */ public function store() { $input = array_add(Input::get(), 'userId', Auth::id()); $this->publishStatusForm->validate($input); $this->execute(PublishStatusCommand::class, $input); Flash::message('Your status has been updated!'); return Redirect::back(); }
/** * Save a new status * * @return Response */ public function store() { // $input = Input::get(); // $input['userId'] = Auth::id(); $input = array_add(Input::get(), 'userId', Auth::id()); $this->publishStatusForm->validate($input); $this->execute(PublishStatusCommand::class, $input); // $status = $this->execute(new PublishStatusCommand(Input::get('body'), Auth::user()->id)); Flash::message('Your status has been updated'); return Redirect::back(); }
public function store() { /*$input = Input::get(); $input['userId'] = Auth::id();*/ $input = array_add(Input::get(), 'userId', Auth::id()); $this->publishStatusForm->validate($input); $this->execute(PublishStatusCommand::class, $input); /*$this->execute( new PublishStatusCommand(Input::get('body'), Auth::user()->id) );*/ //$command = PublishStatusCommand(Input::get('body')); //flash message return Redirect::back(); }