{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/5630","labels_url":"https://api.github.com/repos/laravel/framework/issues/5630/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/5630/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/5630/events","html_url":"https://github.com/laravel/framework/issues/5630","id":41714859,"number":5630,"title":"URL::route() producing inconsistant routes.","user":{"login":"xylesoft","id":2180505,"avatar_url":"https://avatars.githubusercontent.com/u/2180505?v=3","gravatar_id":"","url":"https://api.github.com/users/xylesoft","html_url":"https://github.com/xylesoft","followers_url":"https://api.github.com/users/xylesoft/followers","following_url":"https://api.github.com/users/xylesoft/following{/other_user}","gists_url":"https://api.github.com/users/xylesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/xylesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xylesoft/subscriptions","organizations_url":"https://api.github.com/users/xylesoft/orgs","repos_url":"https://api.github.com/users/xylesoft/repos","events_url":"https://api.github.com/users/xylesoft/events{/privacy}","received_events_url":"https://api.github.com/users/xylesoft/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/laravel/framework/labels/proposal","name":"proposal","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-09-02T14:26:49Z","updated_at":"2015-01-30T20:34:21Z","closed_at":"2015-01-30T20:34:21Z","body":"It appears that if you provide a route parameter which has a value of NULL (['sort'=>null]) or do not added the parameter key=>value at all, route generation will take the next available route parameter and use it's value as the {sort?} interpolation.\r\n\r\nFor example **['sort'=>null, 'url'=>'cat', 'page'=>2]** or **['url'=>'cat', 'page'=>2]** against route syntax **'/animals/{url}/{sort?}'** will become **'/animals/cat/2'** instead of **'/animals/cat/?page=2'**.\r\n\r\nThe following code snippet shows the weirdness of this behaviour:\r\nhttp://laravel.io/bin/O9zaW\r\n\r\nThis appears to effect 4.1 and 4.2 that I know of."},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/72265916","html_url":"https://github.com/laravel/framework/issues/5630#issuecomment-72265916","issue_url":"https://api.github.com/repos/laravel/framework/issues/5630","id":72265916,"user":{"login":"GrahamCampbell","id":2829600,"avatar_url":"https://avatars.githubusercontent.com/u/2829600?v=3","gravatar_id":"","url":"https://api.github.com/users/GrahamCampbell","html_url":"https://github.com/GrahamCampbell","followers_url":"https://api.github.com/users/GrahamCampbell/followers","following_url":"https://api.github.com/users/GrahamCampbell/following{/other_user}","gists_url":"https://api.github.com/users/GrahamCampbell/gists{/gist_id}","starred_url":"https://api.github.com/users/GrahamCampbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrahamCampbell/subscriptions","organizations_url":"https://api.github.com/users/GrahamCampbell/orgs","repos_url":"https://api.github.com/users/GrahamCampbell/repos","events_url":"https://api.github.com/users/GrahamCampbell/events{/privacy}","received_events_url":"https://api.github.com/users/GrahamCampbell/received_events","type":"User","site_admin":false},"created_at":"2015-01-30T20:34:21Z","updated_at":"2015-01-30T20:34:21Z","body":"Maybe a no-fix then. If you have a clean fix, please send a pull for Taylor to look at."}}