I have an Project
table which belongsTo a Client
what I want to achieve is ordering the Project
table by Clients name, how do I call the name of the client to the orderBy
of the Project
query?
$projects = Project::where('company_id', Auth::user()->company_id)
->search(trim($this->search))
->orderBy($this->column, $this->order)
->paginate($this->size);