mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 18:24:03 +00:00
27 lines
516 B
Markdown
27 lines
516 B
Markdown
---
|
||
title: Livewire integration
|
||
extends: _layouts.documentation
|
||
section: content
|
||
---
|
||
|
||
# Livewire
|
||
|
||
Open the `config/livewire.php` file and change this:
|
||
|
||
```php
|
||
'middleware_group' => ['web'],
|
||
```
|
||
|
||
to this:
|
||
|
||
```php
|
||
'middleware_group' => [
|
||
'web',
|
||
'universal',
|
||
InitializeTenancyByDomain::class, // or whatever tenancy middleware you use
|
||
],
|
||
```
|
||
|
||
Now you can use Livewire both in the central app and the tenant app.
|
||
|
||
Also make sure to enable [universal routes]({{ $page->link('features/universal-routes') }})
|