I'm new to php and trying to learn it. I created a database and one of my fields has the date value. I have tried many times to insert a date and keep getting errors. I need to figure out how to format a date. I have song table and inside the song is a year field that will display the year the song came out. my code is below as well as the error
DB::table('users')->delete();
User::create(array(
'name' => 'Appetite for destruction',
'Year' => '1987-11-11',
));
The error is below
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Year' in 'field list' (SQL: insert into users (name, Year, updated_at, created_at) values (Appetite for destruction, 1987-11-11, 2021-11-14
22:47:58, 2021-11-14 22:47:58))
[PDOException] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Year' in 'field list'
db:seed [--class [CLASS]] [--database [DATABASE]] [--force]