{"action":"closed","issue":{"url":"https://api.github.com/repos/spatie/laravel-model-status/issues/37","repository_url":"https://api.github.com/repos/spatie/laravel-model-status","labels_url":"https://api.github.com/repos/spatie/laravel-model-status/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/spatie/laravel-model-status/issues/37/comments","events_url":"https://api.github.com/repos/spatie/laravel-model-status/issues/37/events","html_url":"https://github.com/spatie/laravel-model-status/issues/37","id":310247656,"number":37,"title":"QueryBuilder::setStatus does not exitst","user":{"login":"celciuz","id":37958783,"avatar_url":"https://avatars0.githubusercontent.com/u/37958783?v=4","gravatar_id":"","url":"https://api.github.com/users/celciuz","html_url":"https://github.com/celciuz","followers_url":"https://api.github.com/users/celciuz/followers","following_url":"https://api.github.com/users/celciuz/following{/other_user}","gists_url":"https://api.github.com/users/celciuz/gists{/gist_id}","starred_url":"https://api.github.com/users/celciuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/celciuz/subscriptions","organizations_url":"https://api.github.com/users/celciuz/orgs","repos_url":"https://api.github.com/users/celciuz/repos","events_url":"https://api.github.com/users/celciuz/events{/privacy}","received_events_url":"https://api.github.com/users/celciuz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-31T15:13:42Z","updated_at":"2018-04-03T09:59:49Z","closed_at":"2018-04-03T09:59:49Z","author_association":"NONE","body":"Hi, please help me, i have a something error in my first try at this package. I have insert the UseStatuses in model, but i get error. \r\n\r\n**My controller is :** \r\n\r\n    public function statuses(PinjamRuang $pinjamruang)\r\n    {\r\n        $pinjamruangs = $pinjamruang->where('id',1)->setStatus('pending');\r\n    }\r\n\r\n**And I have error :** \r\n\"Method Illuminate\\Database\\Query\\Builder::setStatus does not exist.\"\r\n\r\n\r\n**PinjamRuang is my model and I have inserted useHasStatuses like this :** \r\n\r\nuse Illuminate\\Database\\Eloquent\\Model;\r\nuse Spatie\\ModelStatus\\HasStatuses;\r\nclass PinjamRuang extends Model\r\n{\r\n    use HasStatuses;\r\n    protected $fillable = [\r\n        'user_id', 'ruang_id', 'waktu_mulai', 'waktu_selesai', 'kegiatan', 'lampiran', \r\n    ];\r\n}\r\n\r\nI also do vendor publish like in the tutorial, but the error still come."}}
{"actor":{"display_login":"freekmurze"}}