-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Route::clone #169
Comments
updating /**
* When cloning the Route, reset the `$attributes` to an empty array, and
* clear the `$failedRule`.
*/
public function __clone()
{
// $this is the cloned instance, not the original
$this->attributes = array();
$this->failedRule = null;
}
/**
* Magic read-only for all properties.
*
* @param string $key The property to read from.
*
* @return mixed
*/
public function __get($key)
{
if ($key === 'attributes') {
return array_merge($this->defaults, $this->attributes);
}
return $this->$key;
} |
I agree the comment Next time if possible send a failing test case. It may be helpful. |
@harikt |
Route::__clone
comment says one thing / code does another
when dealing with routes I don't know if attribute came from url, or some inherited default
If I use
Generator
to build this new route it's going to use the inherited default over the new defaultThe text was updated successfully, but these errors were encountered: