mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 02:04:03 +00:00
Merge eee2cb7b17 into becfe35a68
This commit is contained in:
commit
6455bb817c
1 changed files with 29 additions and 0 deletions
|
|
@ -29,3 +29,32 @@ 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') }}).
|
||||
|
||||
And if you're using file uploads, read the [Real-time facades]({{ $page->link('realtime-facades') }}) page of the documentation. Livewire uses real-time facades in the uploading logic.
|
||||
|
||||
if you are using InitializeTenancyByPath and Livewire
|
||||
you wil need
|
||||
|
||||
config/livewire.php
|
||||
```
|
||||
'middleware_group' => [
|
||||
'web',
|
||||
InitializeTenancyByPath::class, // or whatever tenancy middleware you use
|
||||
],
|
||||
```
|
||||
add in the tenant route group
|
||||
```
|
||||
Route::post('livewire/message/{name}', [HttpConnectionHandler::class, '__invoke']);
|
||||
```
|
||||
|
||||
In Blade just after @livewireScripts:
|
||||
|
||||
```
|
||||
@livewireScripts
|
||||
<script>
|
||||
window.livewire_app_url = '{{ tenant()->id}}';
|
||||
</script>
|
||||
```
|
||||
|
||||
And in case you are wondering about the config of Livewire, there is no need to change it. Just leave it as it is; null:
|
||||
```
|
||||
'asset_url' => null,
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue