I have problems get the options for select with ajax:
"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'full_name' in 'where clause' (SQL: select count(*) as aggregate from drivers where full_name like %% ▶"
public function drivers(Request $request)
{
$q = $request->get('q');
return Driver::select("id", "first_name", "last_name"
,DB::raw("CONCAT(first_name,' ',last_name) as full_name"))
->where('full_name', 'like', "%$q%")->paginate(null, ['id', 'full_name as text']);
}
I do not know where is the problem, any possible solution?
Thanks