[Vuejs]-Laravel – Get data between tables using foreign key in Eloquent

0👍

use this

I am not sure but try this

public function index()
{
    $usuario = auth()->user();
    $taskJobs= TaskJob::(['rel1','rel2'])->where('id_user', $usuario->id)->orderBy('start_task', 'DESC')->Paginate(10);
    return view('taskjobs.index')->with(['taskjobs', 'usuario');
}

Leave a comment