Permalink
Browse files

Dynamic flashing on Redirect.

  • Loading branch information...
taylorotwell committed Oct 3, 2013
1 parent eabd6b6 commit 97bbfe6f09e7b0a5143d65568e886f7a1ace2f9c
Showing with 17 additions and 0 deletions.
  1. +17 −0 src/Illuminate/Http/RedirectResponse.php
@@ -169,4 +169,21 @@ public function setSession(SessionStore $session)
$this->session = $session;
}
/**
* Dynamically bind flash data in the session.
*
* @param string $method
* @param array $parameters
* @return void
*/
public function __call($method, $parameters)
{
if (starts_with($method, 'with'))
{
return $this->with(snake_case(substr($method, 4)), $parameters[0]);
}
throw new \BadMethodCallException("Method [$method] does not exist on Redirect.");
}
}

0 comments on commit 97bbfe6

Please sign in to comment.