@extends('layouts.app') @section('title', 'Regions') @section('heading', 'Regions') @section('subheading', 'The state / area codes used on the tenancy listing') @section('content') {{-- Each row's inputs belong to a form declared here and referenced by the HTML5 form="" attribute, because a
cannot legally wrap a . --}} @foreach ($regions as $region) @csrf @method('PUT')
@if ($region->tenancies_count === 0)
@csrf @method('DELETE')
@endif @endforeach
Add a region
@csrf
Letters and numbers only — this is what appears in the spreadsheet.
@error('code')
{{ $message }}
@enderror
A region that still has tenancy records cannot be deleted. Switch it off with the Active toggle instead — it then stops appearing when adding new records, while the existing ones keep their region.
{{ $regions->count() }} regions
@foreach ($regions as $region) @endforeach
CodeNameTenancies Active
@if ($region->tenancies_count > 0) {{ $region->tenancies_count }} @else 0 @endif
is_active) aria-label="{{ $region->code }} is active">
@if ($region->tenancies_count === 0) @endif
@endsection