@php $centralRoutes = $routes->filter(function ($route) { return ! in_array('Stancl\Tenancy\Middleware\InitializeTenancyBySubdomain', $route->middleware()); }); $tenantRoutes = $routes->filter(function ($route) { return in_array('Stancl\Tenancy\Middleware\InitializeTenancyBySubdomain', $route->middleware()); }); @endphp

Central Routes ({{ count($centralRoutes) }})

@php $methodColours = [ 'GET' => 'success', 'HEAD' => 'default', 'OPTIONS' => 'default', 'POST' => 'primary', 'PUT' => 'warning', 'PATCH' => 'info', 'DELETE' => 'danger', ]; @endphp @foreach ($centralRoutes as $route) @php $tenantRoute = false; if (in_array('Stancl\Tenancy\Middleware\InitializeTenancyBySubdomain', $route->middleware())) { $tenantRoute = true; } @endphp @endforeach
Methods Domain Path Name Action Middleware
@foreach (array_diff($route->methods(), config('route-viewer.hide_methods')) as $method) {{ $method }} @endforeach @if ($tenantRoute) tenant.{{ env('CENTRAL_DOMAIN') }} @else {{ $route->domain() }} @endif {!! preg_replace('#({[^}]+})#', '$1', $route->uri()) !!} {{ $route->getName() }} {!! preg_replace( '#(@.*)$#', '$1', str_replace('App\\Http\\Controllers\\', '', $route->getActionName()) ) !!} @if (is_callable([$route, 'controllerMiddleware'])) {!! implode('
', array_map($middlewareClosure, array_merge($route->middleware(), $route->controllerMiddleware()))) !!} @else {!! implode('
', $route->middleware()) !!} @endif

Tenant Routes ({{ count($tenantRoutes) }})

@php $methodColours = [ 'GET' => 'success', 'HEAD' => 'default', 'OPTIONS' => 'default', 'POST' => 'primary', 'PUT' => 'warning', 'PATCH' => 'info', 'DELETE' => 'danger', ]; @endphp @foreach ($tenantRoutes as $route) @php $tenantRoute = false; if (in_array('Stancl\Tenancy\Middleware\InitializeTenancyBySubdomain', $route->middleware())) { $tenantRoute = true; } @endphp @endforeach
Methods Domain Path Name Action Middleware
@foreach (array_diff($route->methods(), config('route-viewer.hide_methods')) as $method) {{ $method }} @endforeach @if ($tenantRoute) tenant.{{ env('CENTRAL_DOMAIN') }} @else {{ $route->domain() }} @endif {!! preg_replace('#({[^}]+})#', '$1', $route->uri()) !!} {{ $route->getName() }} {!! preg_replace( '#(@.*)$#', '$1', str_replace('App\\Http\\Controllers\\', '', $route->getActionName()) ) !!} @if (is_callable([$route, 'controllerMiddleware'])) {!! implode('
', array_map($middlewareClosure, array_merge(array_map(function ($middleware) { return str_replace('Stancl\\Tenancy\\Middleware\\', '', $middleware); }, $route->middleware()), $route->controllerMiddleware()))) !!} @else {!! implode('
', array_map(function ($middleware) { return str_replace('Stancl\\Tenancy\\Middleware\\', '', $middleware); }, $route->middleware())) !!} @endif