{"action":"created","issue":{"url":"https://api.github.com/repos/tightenco/ziggy/issues/191","repository_url":"https://api.github.com/repos/tightenco/ziggy","labels_url":"https://api.github.com/repos/tightenco/ziggy/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/tightenco/ziggy/issues/191/comments","events_url":"https://api.github.com/repos/tightenco/ziggy/issues/191/events","html_url":"https://github.com/tightenco/ziggy/issues/191","id":380448638,"node_id":"MDU6SXNzdWUzODA0NDg2Mzg=","number":191,"title":"JS current method with optional parameter","user":{"login":"s-widerberg","id":3673799,"node_id":"MDQ6VXNlcjM2NzM3OTk=","avatar_url":"https://avatars0.githubusercontent.com/u/3673799?v=4","gravatar_id":"","url":"https://api.github.com/users/s-widerberg","html_url":"https://github.com/s-widerberg","followers_url":"https://api.github.com/users/s-widerberg/followers","following_url":"https://api.github.com/users/s-widerberg/following{/other_user}","gists_url":"https://api.github.com/users/s-widerberg/gists{/gist_id}","starred_url":"https://api.github.com/users/s-widerberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-widerberg/subscriptions","organizations_url":"https://api.github.com/users/s-widerberg/orgs","repos_url":"https://api.github.com/users/s-widerberg/repos","events_url":"https://api.github.com/users/s-widerberg/events{/privacy}","received_events_url":"https://api.github.com/users/s-widerberg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-13T22:16:13Z","updated_at":"2018-11-14T12:05:50Z","closed_at":null,"author_association":"NONE","body":"### Expected Behavior\r\nWhen the URI you are currently navigated to uses an optional parameter route().current() should return the current route\r\n\r\n### Current Behavior\r\nWhen I'm on a route with an optional parameter, and am not using the optional parameter, route().current() is returning undefined. If I use the parameter route().current() is working correctly.\r\n\r\nIn the route listed below when I'm on\r\n\r\n```/quotes/futures```\r\n```route().current()``` -> undefined\r\n\r\n```/quotes/futures/```\r\n```route().current()``` -> undefined\r\n\r\n```/quotes/futures/something```\r\n```route().current()``` -> quotes.futures as expected\r\n\r\n## For bug reports only please provide\r\n### Currently installed Laravel version:\r\n`5.6.16`\r\n\r\n### Currently installed Ziggy version\r\n`0.6.9`\r\n\r\n### Example route from your Laravel Routes file.\r\n_i.e. -_\r\n```php\r\nRoute::get('quotes/futures/{symbol?}', 'FuturesController@index')->name('quotes.futures');\r\n```\r\n### Contents of Ziggy.namedRoutes\r\n```js\r\n{\"quotes.futures\":{\"uri\":\"quotes/futures/{symbol?}\",\"methods\":[\"GET\",\"HEAD\"],\"domain\":null}}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/tightenco/ziggy/issues/comments/438639754","html_url":"https://github.com/tightenco/ziggy/issues/191#issuecomment-438639754","issue_url":"https://api.github.com/repos/tightenco/ziggy/issues/191","id":438639754,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODYzOTc1NA==","user":{"login":"Livijn","id":349311,"node_id":"MDQ6VXNlcjM0OTMxMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/349311?v=4","gravatar_id":"","url":"https://api.github.com/users/Livijn","html_url":"https://github.com/Livijn","followers_url":"https://api.github.com/users/Livijn/followers","following_url":"https://api.github.com/users/Livijn/following{/other_user}","gists_url":"https://api.github.com/users/Livijn/gists{/gist_id}","starred_url":"https://api.github.com/users/Livijn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Livijn/subscriptions","organizations_url":"https://api.github.com/users/Livijn/orgs","repos_url":"https://api.github.com/users/Livijn/repos","events_url":"https://api.github.com/users/Livijn/events{/privacy}","received_events_url":"https://api.github.com/users/Livijn/received_events","type":"User","site_admin":false},"created_at":"2018-11-14T12:05:50Z","updated_at":"2018-11-14T12:05:50Z","author_association":"NONE","body":"I am experiencing the same bug."}}
{"actor":{"display_login":"Livijn"}}