Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

PaulCatalin97's avatar

Call to a member function sortable() on array

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);
0 likes
5 replies
PaulCatalin97's avatar

my life yould be easier i someone explained me that. I`m a begginer, not an expert to understand that documentation made specificly for an senior

mstrauss's avatar

Are you using a package to get the sortable method?

Snapey's avatar

The docs;

Use Sortable trait inside your Eloquent model(s).

You are not using Eloquent models.

Please or to participate in this conversation.