1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 20:34:03 +00:00
This commit is contained in:
Samuel Štancl 2019-07-30 18:04:05 +02:00
parent d0d1f6930b
commit f7bbf59f0c
3 changed files with 30 additions and 1 deletions

View file

@ -3,6 +3,7 @@
namespace Stancl\Tenancy;
use Stancl\Tenancy\Commands\Seed;
use Laravel\Telescope\Telescope;
use Stancl\Tenancy\TenantManager;
use Stancl\Tenancy\DatabaseManager;
use Stancl\Tenancy\Commands\Migrate;
@ -42,6 +43,19 @@ class TenancyServiceProvider extends ServiceProvider
]);
$this->app->register(TenantRouteServiceProvider::class);
if (class_exists(Telescope::class)) {
$original_callback = Telescope::tagUsing;
Telescope::tag(function (\Laravel\Telescope\IncomingEntry $entry) use ($original_callback) {
$tags = [];
if (tenancy()->initialized) {
$tags = ['tenant:'.tenanct('uuid')];
}
return array_merge($original_callback($entry), $tags);
});
}
}
/**