mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 02:04:03 +00:00
Update livewire.blade.md (#259)
* Update livewire.blade.md Update livewire integration instructions to refelect ivewire 3 changes. * Update livewire.blade.md * remove unnecessary indentation --------- Co-authored-by: Samuel Štancl <samuel@archte.ch>
This commit is contained in:
parent
eceab47a75
commit
7e8471dfbd
1 changed files with 18 additions and 0 deletions
|
|
@ -22,6 +22,24 @@ to this:
|
||||||
],
|
],
|
||||||
```
|
```
|
||||||
|
|
||||||
|
In Livewire 3, the configuration key `middleware_group` has been removed, so instead add the following in `TenancyServiceProvider` (or any other provider):
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function boot(): void
|
||||||
|
{
|
||||||
|
// ...
|
||||||
|
|
||||||
|
Livewire::setUpdateRoute(function ($handle) {
|
||||||
|
return Route::post('/livewire/update', $handle)
|
||||||
|
->middleware(
|
||||||
|
'web',
|
||||||
|
'universal',
|
||||||
|
InitializeTenancyByDomain::class, // or whatever tenancy middleware you use
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
(Don't forget to import the middleware class.)
|
(Don't forget to import the middleware class.)
|
||||||
|
|
||||||
Now you can use Livewire both in the central app and the tenant app.
|
Now you can use Livewire both in the central app and the tenant app.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue