public function postFork($hash) { $parent = $this->repository->getByHash($hash); $command = new Commands\CreateForkCommand($this->request->get('code'), $this->auth->user(), $parent); $fork = $this->bus->execute($command); return $this->redirector->action('BinController@getShow', [$fork->hash]); }
/** * Update the specified resource in storage. * * @param int $id * @return Response */ public function update($id, Personne $Personne, Request $request, Redirector $redirect) { // return var_dump(Input::all()); // return 'update de la fiche '.$id; $Personne->update($id, $request); // return $redirect->back(); return $redirect->action('PersonneController@index'); }
/** * Create a new redirect response to a controller action. * * @param string $action * @param array $parameters * @param int $status * @param array $headers * @return \Illuminate\Http\RedirectResponse * @static */ public static function action($action, $parameters = array(), $status = 302, $headers = array()) { return \Illuminate\Routing\Redirector::action($action, $parameters, $status, $headers); }
/** * Create a new redirect response to a controller action. * * @param string $action * @param array $parameters * @param int $status * @param array $headers * @return \Symfony\Component\HttpFoundation\Response */ public function redirectToAction($action, $parameters = array(), $status = 302, $headers = array()) { return $this->redirector->action($action, $parameters, $status, $headers); }