prefix('customers') ->name('customers.') ->group(function () { Route::livewire('/', 'customers::index')->name('index'); Route::livewire('/create', 'customers::form')->name('create'); Route::livewire('/{customer}', 'customers::show')->whereNumber('customer')->name('show'); Route::livewire('/{customer}/edit', 'customers::form')->whereNumber('customer')->name('edit'); Route::livewire('/{customer}/contacts/create', 'customers::contact-form') ->whereNumber('customer') ->name('contacts.create'); Route::livewire('/{customer}/contacts/{contact}/edit', 'customers::contact-form') ->whereNumber(['customer', 'contact']) ->name('contacts.edit'); Route::livewire('/{customer}/billing-units/create', 'customers::billing-unit-form') ->whereNumber('customer') ->name('billing-units.create'); Route::livewire('/{customer}/billing-units/{billingUnit}/edit', 'customers::billing-unit-form') ->whereNumber(['customer', 'billingUnit']) ->name('billing-units.edit'); });