laravel/framework — pull request #515 by driesvints (2013-03-06 11:22:33+00:00)
Title: Pass non-named routes through Form::open()

It seemed a bit odd that the option to pass along non-named routes wasn't provided. Currently you can only pass along real urls through the `url` parameter for `Form::open()`.

```php
Form::open(array('url' => 'http://example/foo/bar'));
```

But if you want to pass along a non-named route that wouldn't work.

```php
Form::open(array('url' => 'route/foo'));
```

You'd have to do the following:

```php
Form::open(array('url' => URL::to('route/foo')));
```

With this PR you can now pass non-named routes alongside urls to Form::open with the 'url' parameter. The UrlGenerator will validate if it's a valid url and will otherwise try to generate an url if it's a route.