mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 06:54:05 +00:00
wip
This commit is contained in:
parent
f23fd125b1
commit
496b8a3ff0
1 changed files with 5 additions and 5 deletions
|
|
@ -2,9 +2,10 @@
|
||||||
|
|
||||||
namespace Stancl\Tenancy;
|
namespace Stancl\Tenancy;
|
||||||
|
|
||||||
use Stancl\Tenancy\Commands\Seed;
|
|
||||||
use Laravel\Telescope\Telescope;
|
use Laravel\Telescope\Telescope;
|
||||||
use Stancl\Tenancy\TenantManager;
|
use Stancl\Tenancy\TenantManager;
|
||||||
|
use Stancl\Tenancy\Commands\Seed;
|
||||||
|
use Illuminate\Cache\CacheManager;
|
||||||
use Stancl\Tenancy\DatabaseManager;
|
use Stancl\Tenancy\DatabaseManager;
|
||||||
use Stancl\Tenancy\Commands\Migrate;
|
use Stancl\Tenancy\Commands\Migrate;
|
||||||
use Stancl\Tenancy\Commands\Rollback;
|
use Stancl\Tenancy\Commands\Rollback;
|
||||||
|
|
@ -13,7 +14,6 @@ use Illuminate\Support\ServiceProvider;
|
||||||
use Stancl\Tenancy\Commands\TenantList;
|
use Stancl\Tenancy\Commands\TenantList;
|
||||||
use Stancl\Tenancy\Interfaces\StorageDriver;
|
use Stancl\Tenancy\Interfaces\StorageDriver;
|
||||||
use Stancl\Tenancy\Interfaces\ServerConfigManager;
|
use Stancl\Tenancy\Interfaces\ServerConfigManager;
|
||||||
use Illuminate\Cache\CacheManager;
|
|
||||||
|
|
||||||
class TenancyServiceProvider extends ServiceProvider
|
class TenancyServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
|
@ -40,7 +40,7 @@ class TenancyServiceProvider extends ServiceProvider
|
||||||
$this->loadRoutesFrom(__DIR__ . '/routes.php');
|
$this->loadRoutesFrom(__DIR__ . '/routes.php');
|
||||||
|
|
||||||
Route::middlewareGroup('tenancy', [
|
Route::middlewareGroup('tenancy', [
|
||||||
\Stancl\Tenancy\Middleware\InitializeTenancy::class
|
\Stancl\Tenancy\Middleware\InitializeTenancy::class,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->app->register(TenantRouteServiceProvider::class);
|
$this->app->register(TenantRouteServiceProvider::class);
|
||||||
|
|
@ -51,7 +51,7 @@ class TenancyServiceProvider extends ServiceProvider
|
||||||
Telescope::tag(function (\Laravel\Telescope\IncomingEntry $entry) use ($original_callback) {
|
Telescope::tag(function (\Laravel\Telescope\IncomingEntry $entry) use ($original_callback) {
|
||||||
$tags = [];
|
$tags = [];
|
||||||
if (tenancy()->initialized) {
|
if (tenancy()->initialized) {
|
||||||
$tags = ['tenant:'.tenanct('uuid')];
|
$tags = ['tenant:' . tenant('uuid')];
|
||||||
}
|
}
|
||||||
|
|
||||||
return array_merge($original_callback($entry), $tags);
|
return array_merge($original_callback($entry), $tags);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue