0
Good afternoon everyone, I have the following appointment:
$acordo = tb_acordo::join('users', 'users_id', '=', 'users.id')
->join('tb_status_acordos', 'tb_status_acordos_id', '=', 'tb_status_acordos.id')
->join('tb_carteiras', 'tb_carteira_id', '=', 'tb_carteiras.id')
->where('users_id', $id_user )
->orderBy('data_acordo', 'desc')
->get();
But in the view when I capture the ID this way: {{$acordos->id}}
it brings me the table id users and need table tb_agreement, someone help with this query please?
You can use the
->select()
, take a look at the link of the documentation https://laravel.com/docs/5.8/queries#joins– Ricardo Lucas
Man, I forgot about Select, got a lot of thanks
– Michel Diniz