Well you need to use multiple relations here to do that.
So for example this would get all projects of the user
$user = Auth::user();
$user->load('companies.projects');
// Now you can access all the projects like
foreach ($user->companies as $company) {
$company->projects;
}
// You can for example use the collection methods to merge them to one collection
https://laravel.com/docs/5.6/collections#method-flatten
Another option is to do two queries to fetch everything at once
$companies = Auth::user()->companies;
$projects = Project::whereIn('company_id', $companies->pluck('id'))->get();
Let me know if this works for you ;)