@extends('layouts.demo10.base') @section('content') @can('view.tenant')

Tenants

Home / Tenants
{{-- ✅ STEP 1: BANNER goes HERE — above the card/table @if(false && $activeProjectId) @php $activeTenant = $projects->firstWhere('id', $activeProjectId); @endphp @if($activeTenant)
Active Tenant Connected {{ $activeTenant->name }}  ·  DB: {{ $activeTenant->dynamic_database ?? 'N/A' }}  ·  User: {{ $activeTenant->user->name ?? 'N/A' }}
@endif @else @endif --}}
@endcan
{{-- --}} @canany(['edit.projects', 'delete.projects']) @endcanany @foreach($projects as $project) @php $isActive = $activeProjectId == $project->id; $domainProgressUrl = null; if (filled($project->custom_domain)) { $domainBase = preg_match('#^https?://#i', $project->custom_domain) ? $project->custom_domain : (($project->custom_domain_scheme ?? 'https') . '://' . $project->custom_domain); $domainProgressUrl = rtrim($domainBase, '/') . '/progress'; } @endphp {{-- TENANT CONNECT/DISCONNECT BUTTON --}} @endforeach
Id Email Organization Name Domain Progress Link Industry Type Time Zone Created AtUpdated At
{{ $project->id }} {{ $project->user->email ?? 'N/A' }} {{ $project->organization->name ?? 'N/A' }} @if($domainProgressUrl) {{ $domainProgressUrl }} @else No domain assigned @endif {{ $project->organization->industry_type ?? 'N/A' }} {{ $project->organization->timezone ?? 'N/A' }} {{ optional($project?->updated_at)->format('M d, Y') ?? 'N/A' }} @if($isActive) @else @endif

Add New Tenant

@csrf

Edit Tenant

@csrf

Edit Organization

@endsection @section('scripts') @vite('resources/js/pages/projects.js') @endsection