{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/12894","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/12894/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/12894/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/12894/events","html_url":"https://github.com/laravel/framework/issues/12894","id":143968458,"number":12894,"title":"Eloquent Collection's makeVisible method only works when using the 'hidden' property","user":{"login":"marcmascarell","id":642299,"avatar_url":"https://avatars.githubusercontent.com/u/642299?v=3","gravatar_id":"","url":"https://api.github.com/users/marcmascarell","html_url":"https://github.com/marcmascarell","followers_url":"https://api.github.com/users/marcmascarell/followers","following_url":"https://api.github.com/users/marcmascarell/following{/other_user}","gists_url":"https://api.github.com/users/marcmascarell/gists{/gist_id}","starred_url":"https://api.github.com/users/marcmascarell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcmascarell/subscriptions","organizations_url":"https://api.github.com/users/marcmascarell/orgs","repos_url":"https://api.github.com/users/marcmascarell/repos","events_url":"https://api.github.com/users/marcmascarell/events{/privacy}","received_events_url":"https://api.github.com/users/marcmascarell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-28T12:48:21Z","updated_at":"2016-03-28T12:50:04Z","closed_at":null,"body":"I came to an unexpected result when using **makeVisible** method and not making the attributes I passed visible, so I saw that the reason was that the method will only make visible the fields if them are in the 'hidden' property.\r\n\r\nModel.php\r\n```php\r\n    protected $visible = ['remaining', 'restored_at'];\r\n```\r\n\r\n```php\r\n    // id not returned\r\n    $model->all()->makeVisible(['id'])->toArray();\r\n```\r\n\r\nInstead having Model.php\r\n```php\r\n    protected $hidden = ['id'];\r\n```\r\n\r\n```php\r\n    // id returned\r\n    $model->all()->makeVisible(['id'])->toArray();\r\n```\r\n\r\nThe easy workaround would be using hidden property but I'm making a package and I need to get a full properties toArray() no matter which property the user uses.\r\n\r\nIs this the expected behaviour?"},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/202373641","html_url":"https://github.com/laravel/framework/issues/12894#issuecomment-202373641","issue_url":"https://api.github.com/repos/laravel/framework/issues/12894","id":202373641,"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":"2016-03-28T12:50:04Z","updated_at":"2016-03-28T12:50:04Z","body":"Ping @taylorotwell."}}