# Area admin CRUD and rent search SEO

Adds super-admin create/edit for Bay areas (beyond the nine Order Market towns) and separate rent-search SEO fields per area.

## Deploy steps

Production (cPanel **srv07**, app root `~/public_html/baymove.co.uk`): use PHP **8.5** at `/opt/cpanel/ea-php85/root/usr/bin/php` — the only installed version with the Redis extension.

1. **Migrate**

   ```bash
   cd ~/public_html/baymove.co.uk && /opt/cpanel/ea-php85/root/usr/bin/php artisan migrate --force
   ```

2. **Seed additional towns** (creates Hest Bank, Bolton-le-Sands and Torrisholme if missing; does not overwrite names or admin-edited coordinates; only replaces lat/lng that still match the original incorrect seeded values)

   ```bash
   cd ~/public_html/baymove.co.uk && /opt/cpanel/ea-php85/root/usr/bin/php artisan db:seed --class=Database\\Seeders\\AdditionalBayAreasSeeder --force
   ```

   On a full fresh seed, `DatabaseSeeder` already calls `AdditionalBayAreasSeeder` after `AreaSeeder`.

3. **Build frontend assets** if this release ships compiled JS changes (admin area forms).

4. **Clear caches** (safe production sequence — do **not** run `optimize:clear`):

   ```bash
   cd ~/public_html/baymove.co.uk && /opt/cpanel/ea-php85/root/usr/bin/php artisan config:clear && /opt/cpanel/ea-php85/root/usr/bin/php artisan route:clear && /opt/cpanel/ea-php85/root/usr/bin/php artisan view:clear && /opt/cpanel/ea-php85/root/usr/bin/php artisan optimize
   ```

## Behaviour notes

- Property search resolves locations against active `areas` rows by name (and postcodes as before). New towns appear in location suggest and the mobile `GET /api/v1/areas` list once `is_active` is true.
- The XML/visual sitemaps do not enumerate per-town search URLs; area pages are reached via `/properties?transaction=…&location=…` (unchanged).
- Sale SEO uses existing `seo_*` columns. Rent SEO uses new `seo_rent_*` columns; when rent fields are empty, let search keeps the default “Properties to rent in {town}” heading and no custom meta.

## New database columns

| Column | Purpose |
| --- | --- |
| `seo_rent_page_heading` | H1 on to-rent search |
| `seo_rent_meta_title` | Document title |
| `seo_rent_meta_description` | Meta description |
| `seo_rent_heading` | Optional section heading above body |
| `seo_rent_content` | Markdown body under results |

`ordermarket_town_id` and `ordermarket_slug` are nullable so admin-created areas do not require Order Market IDs.
