ModelNotFoundException in queued job Laravel Origin: Application & API Last updated 4 Nov 2026

Laravel Queue: Illuminate\Queue\SerializesModels: No query results for model [App\Models\Order] 42 (job failed)

A queued job serialised a model by ID, but the record was deleted before the worker ran it.

Exact message you may see No query results for model in queue jobModelNotFoundException: No query results for model [App\Models\Order] queued jobIlluminate\Queue\SerializesModels ModelNotFoundExceptionJob failed ModelNotFoundException
Seen on: Laravel PHP

Meaning

SerializesModels stores only the model identifier and re-fetches it when the job runs. If the row is gone (or soft-deleted), a ModelNotFoundException is thrown. Use $deleteWhenMissingModels = true, pass IDs and look up safely, or check state in handle().

Common causes

  • Model deleted between dispatch and execution
  • Soft-deleted model without withTrashed
  • Dispatch inside a transaction that hasn't committed yet
  • Wrong database/connection in worker
  • Race with cleanup jobs

⚡ Quick fix

  1. Set public $deleteWhenMissingModels = true; on the job
  2. Use ->afterCommit() when dispatching inside transactions
  3. Pass the ID and re-query defensively

Detailed fix by platform

Laravel

  1. SendReceipt::dispatch($order)->afterCommit();

How to diagnose

  1. Model — Still exists?
  2. Transaction — Committed before dispatch?
  3. Soft delete — Trashed?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

BadMethodCallException: Call to undefined method — Laravel: BadMethodCallException: Call to undefined method App\Models\Post::whereTitle() / Illuminate\Database\Eloquent\Builder::foo() (Laravel)BadMethodCallExceptio…Command "x" is not defined — Laravel: Symfony\Component\Console\Exception\CommandNotFoundException: Command "make:livewire" is not defined. Did you mean one of these? (Laravel)Command "x" is not de…Laravel: Allowed memory size exhausted (request) — Laravel/PHP: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in vendor/laravel/framework (Laravel)Laravel: Allowed memo…MaxAttemptsExceededException (queue job) — Laravel Queue: Illuminate\Queue\MaxAttemptsExceededException: App\Jobs\SendReport has been attempted too many times or run too long (Laravel)MaxAttemptsExceededEx…No query results for model — Laravel: Illuminate\Database\Eloquent\ModelNotFoundException: No query results for model [App\Models\Post] 5 (Laravel)No query results for …Property [x] does not exist on this collection instance — Laravel: Exception: Property [name] does not exist on this collection instance. (Laravel)Property [x] does not…Redis connection refused (Laravel) — Laravel: Predis\Connection\ConnectionException: Connection refused [tcp://127.0.0.1:6379] / RedisException: Connection refused (Laravel)Redis connection refu…ModelNotF…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.