I have been following the https://laracasts.com series on Laravel-5 fundamentals, I am little new to all this , MySQL and frameworks..
I used 'php artisan tinker' command to change the attributes for my column. But I made a typo and typed 'event_desciption' instead of 'event_description' Now whenever I try to save it using $events->save(); It gives an Error.
The Columns name I gave :
$table->increments('id');
$table->string('event_name');
$table->integer('cost');
$table->text('event_description');
$table->text('terms_and_condition');
$table->string('organized_by');
$table->timestamps();
$table->timestamp('published_at');
the typo I made while creating an events object.. $events;
$events;
=> App\event {#627
event_name: "My first evenr name",
cost: 20,
>event_desciption: " the event description",
terms_and_condition: " our terms and condition",
organized_by: "organized by us",
published_at: Carbon\Carbon {#634
+"date": "2016-06-07 20:17:44.000000",
+"timezone_type": 3,
+"timezone": "UTC",
},
updated_at: "2016-06-07 20:19:54",
created_at: "2016-06-07 20:19:54,
The error it gives :
$events->save(); Illuminate\Database\QueryException with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'event_desciption' in 'field list' (SQL: insert into
events(event_name,cost,event_desciption,terms_and_condition,organized_by,published_at,updated_at,created_at) values (My first evenr name, 20, the event description, our terms and condition, organized by us, 2016-06-07 20:17:44, 2016-06-07 20:19:54, 2016-06-07 20:19:54))'
How can one Change the column name without without creating an another object to do the same thing?
Thank You :)