so i have this table to show datas from 3 tables joined, how can i use sortable in this situation? $candidat = DB::SELECT('select p.id, p.first_name, p.last_name, p.phone, p.cv , j.id, j.titlu , jp.id, jp.id_job, jp.id_profile, jp.created_at, jp.created_at as data_aplicare, se.name as skill, j.id_skill as aptitudine_necesara from job_to_profile jp inner join joburi j on j.id = jp.id_job inner join profile_employee p on p.id = jp.id_profile inner join skill_toprofile sp on sp.id_profile = p.id inner join skills_employee se on se.id = sp.id_skill')->sortable()->paginate(15);
Otherwise, the result of DB::select is an array, not a Builder instance (if that is what you were expecting). You can get a Builder instance using the form:
DB::table('job_to_profile as jp')
->selectRaw('p.id, p.first_name, p.last_name, p.phone, p.cv , j.id, j.titlu , jp.id, jp.id_job, jp.id_profile, jp.created_at, jp.created_at as data_aplicare, se.name as skill, j.id_skill as aptitudine_necesara')
->join(...)
// other Builder methods
->get();