{"action":"closed","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/9167","labels_url":"https://api.github.com/repos/laravel/framework/issues/9167/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/9167/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/9167/events","html_url":"https://github.com/laravel/framework/issues/9167","id":86709192,"number":9167,"title":"[5.1] Call to undefined method newQuery on $model->push","user":{"login":"CupOfTea696","id":7327050,"avatar_url":"https://avatars.githubusercontent.com/u/7327050?v=3","gravatar_id":"","url":"https://api.github.com/users/CupOfTea696","html_url":"https://github.com/CupOfTea696","followers_url":"https://api.github.com/users/CupOfTea696/followers","following_url":"https://api.github.com/users/CupOfTea696/following{/other_user}","gists_url":"https://api.github.com/users/CupOfTea696/gists{/gist_id}","starred_url":"https://api.github.com/users/CupOfTea696/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CupOfTea696/subscriptions","organizations_url":"https://api.github.com/users/CupOfTea696/orgs","repos_url":"https://api.github.com/users/CupOfTea696/repos","events_url":"https://api.github.com/users/CupOfTea696/events{/privacy}","received_events_url":"https://api.github.com/users/CupOfTea696/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/laravel/framework/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/laravel/framework/labels/database","name":"database","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-09T19:31:16Z","updated_at":"2015-06-10T08:03:22Z","closed_at":"2015-06-10T08:03:22Z","body":"I just updated to 5.1, and I started getting this error when I save a model and its relations using the push method:\r\n\r\n```php\r\nFatalErrorException in Model.php line 857:\r\nCall to undefined method Illuminate\\Database\\Eloquent\\Collection::newQuery()\r\nin Model.php line 857\r\nat FatalErrorException->__construct() in HandleExceptions.php line 127\r\nat HandleExceptions->fatalExceptionFromError() in HandleExceptions.php line 112\r\nat HandleExceptions->handleShutdown() in HandleExceptions.php line 0\r\nat Model->hasMany() in User.php line 53\r\nat User->collections() in EventServiceProvider.php line 42\r\nat EventServiceProvider->Stribe\\Providers\\{closure}() in Dispatcher.php line 220\r\nat call_user_func_array:{/home/vagrant/projects/Stribe/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:220}() in Dispatcher.php line 220\r\nat Dispatcher->fire() in Model.php line 1636\r\nat Model->fireModelEvent() in Model.php line 1566\r\nat Model->performInsert() in Model.php line 1457\r\nat Model->save() in Model.php line 1408\r\nat Model->push() in YouTube.php line 254\r\nat YouTube->mapUserToModel() in YouTube.php line 222\r\n```"}}