refresh() публичный Метод

Create a new redirect response to the current URI.
public refresh ( integer $status = 302, array $headers = [] ) : Illuminate\Http\RedirectResponse
$status integer
$headers array
Результат Illuminate\Http\RedirectResponse
 /**
  * Handle the form.
  *
  * @param PermissionFormBuilder   $builder
  * @param RoleRepositoryInterface $roles
  * @param Redirector              $redirect
  */
 public function handle(PermissionFormBuilder $builder, RoleRepositoryInterface $roles, Redirector $redirect)
 {
     /* @var RoleInterface|EloquentModel $role */
     $role = $builder->getEntry();
     $roles->save($role->setAttribute('permissions', array_filter(array_flatten($builder->getFormInput()))));
     $builder->setFormResponse($redirect->refresh());
 }
 /**
  * Handle the form.
  *
  * @param PermissionFormBuilder   $builder
  * @param RoleRepositoryInterface $roles
  * @param Redirector              $redirect
  */
 public function handle(PermissionFormBuilder $builder, RoleRepositoryInterface $roles, Redirector $redirect)
 {
     /* @var RoleInterface $role */
     $role = $builder->getEntry();
     $roles->save($role->setPermissions(array_keys(array_dot(array_map(function ($values) {
         return array_combine(array_values($values), array_pad([], count($values), true));
     }, array_filter($builder->getFormInput()))))));
     $builder->setFormResponse($redirect->refresh());
 }
Пример #3
0
 /**
  * Create a new redirect response to the current URI.
  *
  * @param int $status
  * @param array $headers
  * @return \Illuminate\Http\RedirectResponse 
  * @static 
  */
 public static function refresh($status = 302, $headers = array())
 {
     return \Illuminate\Routing\Redirector::refresh($status, $headers);
 }