Merge branch 'develop' into trunk

This commit is contained in:
Jérémy Munsch 2021-08-24 16:05:23 +02:00
commit e31898bb7b

View file

@ -52,8 +52,11 @@ class RouteServiceProvider extends ServiceProvider
throw (new ModelNotFoundException())->setModel(Customer::class);
}
}
/** @var \App\Models\Customer $customer */
return $customer->loadBrandData(app('App\Models\Service')->brand);
if ($brand = app('App\Models\Service')->brand) {
/** @var \App\Models\Customer $customer */
$customer = $customer->loadBrandData($brand);
}
return $customer;
});
}