Im getting this error when I try to save data to mysql using Laravel 5, other forms and save() methods work fine but this one:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sistemal5.cotizacions' doesn't exist (SQL: insert into `cotizacions` (`customer_id`, `total`, `updated_at`, `created_at`) values (1501, 150.69, 2015-05-11 03:16:25, 2015-05-11 03:16:25))
Here is my Controller store method:
public function store(CotFormRequest $request)
{
$quote = new Cotizacion;
$quote->customer_id = Input::get('data.clientid');
$quote->total = Input::get('data.totalAftertax');
$quote->save();
}
And here is my model:
<?php namespace AppModelsCotizacion;
use IlluminateDatabaseEloquentModel;
class Cotizacion extends Model {
}
I must be overlooking something really obvious cause i cant understand why Laravel is adding an "S" the table is cotizacion not cotizacions.
How can i troubleshoot this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…