# Admin / Customer Route Fixes

This build fixes the admin navigation and customer welcome popup.

## Included
- Admin `admin` middleware alias in `bootstrap/app.php`.
- Complete admin route registration.
- `/admin/customers`, `/coupons`, `/banners`, `/offers`, `/reviews`.
- `/admin/pages/about`, `/contact`, `/faq`, `/policies`.
- `/admin/reports` and `/admin/settings`.
- Category trash/restore routes.
- Order update accepts both PUT and PATCH under `admin.orders.update`.
- Customer frontend routes remain in `routes/customer_frontend.php`.
- Customer welcome popup saves name/mobile to `customer_leads`.
- Admin Customers page displays saved popup leads.
- Admin sidebar has a full-height vertical scrollbar.
- Dashboard shows live customer/order/product/sales counts.
- Removed placeholder “Ready for next module” screens.

## After copying the project to XAMPP

Run:

```text
php artisan optimize:clear
php artisan migrate
php artisan storage:link
php artisan serve
```

The `customer_leads` table is created by the new migration.

## PHP DOM/XML requirement

If `php artisan view:cache` reports `Class "DOMDocument" not found`, enable a working PHP XML/DOM extension in the **same PHP installation shown by `php --ini`**.

Your screenshot showed:

```text
Loaded Configuration File: C:\xampp\php\php.ini
Unable to load dynamic library 'xml'
Unable to load dynamic library 'dom'
```

That means the problem is with the XAMPP PHP installation/extension DLLs, not the Laravel routes. Do not simply add `extension=dom` if the required DLLs are missing. Use the matching XAMPP PHP package/version so `php_xml.dll` and its dependencies are present, then enable XML/DOM in `C:\xampp\php\php.ini`.

Verify:

```text
php -m | findstr /I "dom xml"
```

You should see `dom` and `xml`.

Then:

```text
php artisan optimize:clear
php artisan view:cache
```
