1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 20:34:03 +00:00

Add [] fallback

This commit is contained in:
Samuel Štancl 2019-08-19 23:03:28 +02:00 committed by GitHub
parent 824ecfce48
commit 1f4aa77ac4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,7 +63,7 @@ class TenancyServiceProvider extends ServiceProvider
Telescope::tag(function (\Laravel\Telescope\IncomingEntry $entry) {
$tags = $this->app->make(TenantManager::class)->integration('telescope', $entry);
if (\in_array('tenancy', request()->route()->middleware())) {
if (\in_array('tenancy', optional(request()->route())->middleware() ?? [])) {
$tags = \array_merge($tags, [
'tenant:' . tenant('uuid'),
'domain:' . tenant('domain'),