Php – SQLSTATE[42S02]: Base table or view not found: Laravel

htmllaravelMySQLPHP

QueryException in Connection.php line 769:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'hmsdb.customers' doesn't exist (SQL: insert into customers (lastName, firstName, middleName, address, telephone, mobile, notes, updated_at, created_at) values (Arce, Johanna, , ds, N/A, ds, ew, 2016-12-05 09:20:18, 2016-12-05 09:20:18))

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'hmsdb.customers' doesn't exist

The name of the column should be customer and i don't where how to change hmsdb.customers to hmsdb.customer

Best Answer

In your customer model change to it like protected $table = 'customer'; Hope it will help you :)