{"action":"closed","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/23640","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/23640/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/23640/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/23640/events","html_url":"https://github.com/laravel/framework/issues/23640","id":307112190,"number":23640,"title":"Optional failed for non defined variable","user":{"login":"1dnmr","id":15965680,"avatar_url":"https://avatars2.githubusercontent.com/u/15965680?v=4","gravatar_id":"","url":"https://api.github.com/users/1dnmr","html_url":"https://github.com/1dnmr","followers_url":"https://api.github.com/users/1dnmr/followers","following_url":"https://api.github.com/users/1dnmr/following{/other_user}","gists_url":"https://api.github.com/users/1dnmr/gists{/gist_id}","starred_url":"https://api.github.com/users/1dnmr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1dnmr/subscriptions","organizations_url":"https://api.github.com/users/1dnmr/orgs","repos_url":"https://api.github.com/users/1dnmr/repos","events_url":"https://api.github.com/users/1dnmr/events{/privacy}","received_events_url":"https://api.github.com/users/1dnmr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-03-21T03:48:43Z","updated_at":"2018-03-21T14:21:43Z","closed_at":"2018-03-21T14:21:43Z","author_association":"NONE","body":"<!--\r\nPlease use this issue tracker only for reporting Laravel bugs.\r\n\r\nIf you need support, please use the forums:\r\n\r\n- https://laracasts.com/discuss \r\n- https://laravel.io/forum\r\n\r\nAlternatively, you may use Slack (https://larachat.co/) or Stack Overflow (http://stackoverflow.com/questions/tagged/laravel).\r\n\r\nIf you would like to propose new Laravel features, please make a pull request, or open an issue at https://github.com/laravel/internals/issues.\r\n-->\r\n\r\n- Laravel Version: 5.6.11\r\n- PHP Version: 7.1.13\r\n- Database Driver & Version: MySQL \r\n\r\n### Description:\r\n\r\nAny call to optional($value) with underfined $value lead to exception. For example if $value is not defined for blade view.\r\n\r\nI suggest  change function to this:\r\n\r\n    function optional($value = null)\r\n    {\r\n        return new Optional($value ?? null);\r\n    }\r\n\r\n### Steps To Reproduce:\r\n"}}
{"actor":{"display_login":"1dnmr"}}