Laravel: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'status' in 'field list'
The SQL refers to a column that doesn't exist in the table — a missing migration, typo or wrong table.
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'status' in 'field list'Unknown column in 'where clause' LaravelSQLSTATE[42S22]: Column not found: 1054 Unknown column in 'order clause'Illuminate\Database\QueryException SQLSTATE[42S22]Unknown column 'x' in 'field list' Meaning
Compare the model's attributes with the table schema (php artisan db:table posts in Laravel 11). Common cause: the migration wasn't run in this environment. Also check $fillable, accessors, and column names in where/orderBy. Schema changes need php artisan migrate.
Common causes
- Migration not run on this environment
- Typo in column name
- Column renamed in code but not in DB
- Wrong table (
$tableproperty) - Select/
withCountalias assumptions
⚡ Quick fix
php artisan migrate:statusthenphp artisan migrate- Verify with
php artisan db:table TABLE - Fix column names in the query
Detailed fix by platform
Laravel
php artisan migrate:status && php artisan db:table posts
How to diagnose
- Column — Exists in table?
- Migration — Applied?
- Query — Spelled right?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Base table or view already exists Laravel: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists
- Foreign key constraint is incorrectly formed Laravel migration: SQLSTATE[HY000]: General error: 1005 Can't create table (errno: 150 "Foreign key constraint is incorrectly formed")
- Laravel table not found Laravel: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.sessions' doesn't exist
Most viewed in Laravel
- MassAssignmentException Laravel: Illuminate\Database\Eloquent\MassAssignmentException: Add [x] to fillable property to allow mass assignment
- The GET method is not supported for route Laravel: The GET method is not supported for route x. Supported methods: POST (MethodNotAllowedHttpException)
- Route [login] not defined Laravel: Symfony\Component\Routing\Exception\RouteNotFoundException: Route [login] not defined
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 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.
Report a correction or suggest an improvement
Last updated 4 Nov 2026