1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 12:24:04 +00:00

Merge branch 'telescope-tags' of github.com:stancl/tenancy into telescope-tags

This commit is contained in:
Samuel Štancl 2019-08-17 22:31:56 +02:00
commit 8256bf3d6b

View file

@ -49,7 +49,7 @@ class TenancyServiceProvider extends ServiceProvider
$this->app->register(TenantRouteServiceProvider::class);
if (class_exists(Telescope::class)) {
if (\class_exists(Telescope::class)) {
$this->setTelescopeTags();
}
}
@ -60,12 +60,12 @@ class TenancyServiceProvider extends ServiceProvider
Telescope::tag(function (\Laravel\Telescope\IncomingEntry $entry) use ($original_callback) {
$tags = [];
if (! is_null($original_callback)) {
if (! \is_null($original_callback)) {
$tags = $original_callback($entry);
}
if (in_array('tenancy', request()->route()->middleware())) {
$tags = array_merge($tags, ['tenant:' . tenant('uuid')]);
if (\in_array('tenancy', request()->route()->middleware())) {
$tags = \array_merge($tags, ['tenant:' . tenant('uuid')]);
}
return $tags;