It would help getting some of Jeffrey's videos watched. They are in English I know, but perhaps you know someone who can translate as you view.
Don't use copy and paste code, you never learn anything that way. So many here give neat cut and paste answers, but the person does not learn anything. I usually like giving an example so the person has to work it out themselves. As example I gave this a while back:
$quy = Powner::query()->leftJoin('dc_pets', 'dc_powners.ownerid', '=', 'dc_pets.ownerid')
->select('dc_powners.ownerid', 'dc_powners.oname')
->selectRaw('count(dc_pets.petid) as countOfPets')
->groupby('dc_powners.ownerid')
->orderby('dc_powners.oname')
->get();
Results basically give:
ownerid, oname, countOfPets
Like:
5|Bob|3
4|Greg|9
2|Rob|1
Which wasn't their data, but similar to what and how they needed their data.
Work examples in the Docs when you get stuck. Look for past answers on Laracast.com, many past answers is close to what's needed.
To look up past answers, go yo google and enter:
site:laracasts.com some search term
But much of what you need is already in the docs and the laravel api.