# Laravel: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'status' in 'field list'

**Code:** `SQLSTATE[42S22]: Column not found` · **Category:** Laravel · **Seen on:** Laravel, PHP, MySQL

The SQL refers to a column that doesn't exist in the table — a missing migration, typo or wrong table.

## 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 (`$table` property)
- Select/`withCount` alias assumptions

## Quick fix

1. `php artisan migrate:status` then `php artisan migrate`
2. Verify with `php artisan db:table TABLE`
3. Fix column names in the query

## Detailed fix by platform

### Laravel

1. `php artisan migrate:status && php artisan db:table posts`

## How to diagnose

1. **Column** — Exists in table?
2. **Migration** — Applied?
3. **Query** — Spelled right?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/laravel/sqlstate-42s22-column-not-found)
