I am doing some joins and trying to get the data. My query builder is:
$datasource = DB::table('vehicles')->join('brands', 'vehicles.brand_id', '=', 'brands.id')->join('sections', 'vehicles.section_id', '=', 'sections.id')->select('vehicles.*, vehicles.id AS vid');
But i am getting this error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'vehicles.model,' in 'field list' (SQL: select
vehicles.model,asASfromvehiclesinner joinbrandsonvehicles.brand_id=brands.idinner joinsectionsonvehicles.section_id=sections.idlimit 4 offset 0) Line 620
What i am doing wrong ?