organization->locations()->findOrFail($locationId); $location->delete(); session()->flash('status', "Site \"{$location->name}\" supprimé."); } public function with(): array { return [ 'locations' => $this->organization->locations() ->when($this->search, fn ($query) => $query->where(function ($q) { $q->where('name', 'like', "%{$this->search}%") ->orWhere('city', 'like', "%{$this->search}%"); })) ->orderByDesc('is_primary') ->orderBy('name') ->paginate(15), ]; } }; ?>
{{ $organization->name }}
| Nom | Ville | Pays | Téléphone | |
|---|---|---|---|---|
| {{ $location->name }} @if ($location->is_primary) Principal @endif | {{ $location->city ?? '—' }} | {{ $location->country ?? '—' }} | {{ $location->phone ?? '—' }} | Modifier |
| Aucun site pour le moment. | ||||