{"action":"closed","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/10420","labels_url":"https://api.github.com/repos/laravel/framework/issues/10420/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/10420/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/10420/events","html_url":"https://github.com/laravel/framework/issues/10420","id":108997795,"number":10420,"title":"Inconsisten URL Generation Strategies and wrong results for (asset(), url() vs action(), route())","user":{"login":"superdummy","id":10488988,"avatar_url":"https://avatars.githubusercontent.com/u/10488988?v=3","gravatar_id":"","url":"https://api.github.com/users/superdummy","html_url":"https://github.com/superdummy","followers_url":"https://api.github.com/users/superdummy/followers","following_url":"https://api.github.com/users/superdummy/following{/other_user}","gists_url":"https://api.github.com/users/superdummy/gists{/gist_id}","starred_url":"https://api.github.com/users/superdummy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superdummy/subscriptions","organizations_url":"https://api.github.com/users/superdummy/orgs","repos_url":"https://api.github.com/users/superdummy/repos","events_url":"https://api.github.com/users/superdummy/events{/privacy}","received_events_url":"https://api.github.com/users/superdummy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-30T01:45:56Z","updated_at":"2015-09-30T07:55:58Z","closed_at":"2015-09-30T07:55:58Z","body":"Problem: I have installed laravel in a subfolder named (foobar) in XAMPP, resulting in the following  basepaths:\r\n`D:\\xampp\\htdocs\\foobar\\public\\index.php`\r\n`http://localhost/foobar/public`\r\n`In effect: dd(request()->root()) returns \"http://localhost/foobar/public\"`\r\n\r\n\r\nWhen now generating URLS I get different results for: \r\n`url('/test') => \"http://localhost/foobar/public/test\"`\r\n`asset('/test') => \"http://localhost/foobar/public/test\"`\r\nversus\r\n`route('home'); \"http://localhost/test\"`\r\n`action('PageController@index');= > \"http://localhost/test\"`\r\n\r\n=>The last two are incorrect! They do of course not work, missing the `\"foobar/public\"`.\r\n\r\nLooking into `Illuminate\\Routing\\UrlGenerator` it seems that the last two rely on the method `toRoute()` that uses a different way of generating the urls, throwing out that `\"foobar/public\"` segments. But I do not know, why they use a different strategy...\r\nFrom my point of view all four methods should return the same url all with the `\"foobar/public\"` segment, as correctly done by `url()` and `asset()`. Thanks!\r\n"}}