{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/9835","labels_url":"https://api.github.com/repos/laravel/framework/issues/9835/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/9835/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/9835/events","html_url":"https://github.com/laravel/framework/issues/9835","id":98878994,"number":9835,"title":"Model::fresh() does not fail when the record is deleted from database","user":{"login":"budhajeewa","id":451634,"avatar_url":"https://avatars.githubusercontent.com/u/451634?v=3","gravatar_id":"","url":"https://api.github.com/users/budhajeewa","html_url":"https://github.com/budhajeewa","followers_url":"https://api.github.com/users/budhajeewa/followers","following_url":"https://api.github.com/users/budhajeewa/following{/other_user}","gists_url":"https://api.github.com/users/budhajeewa/gists{/gist_id}","starred_url":"https://api.github.com/users/budhajeewa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/budhajeewa/subscriptions","organizations_url":"https://api.github.com/users/budhajeewa/orgs","repos_url":"https://api.github.com/users/budhajeewa/repos","events_url":"https://api.github.com/users/budhajeewa/events{/privacy}","received_events_url":"https://api.github.com/users/budhajeewa/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-08-04T03:11:47Z","updated_at":"2015-08-05T10:18:26Z","closed_at":"2015-08-04T10:08:40Z","body":"Following does fail, as expected.\r\n\r\n```\r\n$ned = \\App\\Person::findOrFail(1);\r\n$ned->delete();\r\n\r\n$nedsGhost = \\App\\Person::findOrFail($ned -> id); //Fails as expected.\r\n```\r\n\r\nHowever, following does not:\r\n\r\n```\r\n$ned = \\App\\Person::findOrFail(1);\r\n$ned->delete();\r\n\r\n$ned->fresh(); //Does not fail as expected. \r\n```\r\n\r\nIf the `Person` is deleted from the database, and `Illuminate\\Database\\Eloquent\\Model::fresh()` \"Reload[s] a fresh model instance from the database.\", how can it not throw a `\\Illuminate\\Database\\Eloquent\\ModelNotFoundException`?\r\n\r\nIf above is the expected behaviour, i.e. return existing instance if the record is deleted database, I suggest considering including a `Illuminate\\Database\\Eloquent\\Model::freshOrFail()`."},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/127948840","html_url":"https://github.com/laravel/framework/issues/9835#issuecomment-127948840","issue_url":"https://api.github.com/repos/laravel/framework/issues/9835","id":127948840,"user":{"login":"budhajeewa","id":451634,"avatar_url":"https://avatars.githubusercontent.com/u/451634?v=3","gravatar_id":"","url":"https://api.github.com/users/budhajeewa","html_url":"https://github.com/budhajeewa","followers_url":"https://api.github.com/users/budhajeewa/followers","following_url":"https://api.github.com/users/budhajeewa/following{/other_user}","gists_url":"https://api.github.com/users/budhajeewa/gists{/gist_id}","starred_url":"https://api.github.com/users/budhajeewa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/budhajeewa/subscriptions","organizations_url":"https://api.github.com/users/budhajeewa/orgs","repos_url":"https://api.github.com/users/budhajeewa/repos","events_url":"https://api.github.com/users/budhajeewa/events{/privacy}","received_events_url":"https://api.github.com/users/budhajeewa/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T10:18:26Z","updated_at":"2015-08-05T10:18:26Z","body":"@bobbybouwmann Sadly I have not dwelt in the inner working of Laravel enough to do that. :disappointed: "}}