mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
Update livewire.blade.md
This commit is contained in:
parent
6143b9e751
commit
eee2cb7b17
1 changed files with 10 additions and 3 deletions
|
|
@ -38,16 +38,23 @@ config/livewire.php
|
||||||
'middleware_group' => [
|
'middleware_group' => [
|
||||||
'web',
|
'web',
|
||||||
InitializeTenancyByPath::class, // or whatever tenancy middleware you use
|
InitializeTenancyByPath::class, // or whatever tenancy middleware you use
|
||||||
],```
|
],
|
||||||
|
```
|
||||||
add in the tenant route group
|
add in the tenant route group
|
||||||
```Route::post('livewire/message/{name}', [HttpConnectionHandler::class, '__invoke']);```
|
```
|
||||||
|
Route::post('livewire/message/{name}', [HttpConnectionHandler::class, '__invoke']);
|
||||||
|
```
|
||||||
|
|
||||||
In Blade just after @livewireScripts:
|
In Blade just after @livewireScripts:
|
||||||
|
|
||||||
```
|
```
|
||||||
@livewireScripts
|
@livewireScripts
|
||||||
<script>
|
<script>
|
||||||
window.livewire_app_url = '{{ tenant()->id}}';
|
window.livewire_app_url = '{{ tenant()->id}}';
|
||||||
</script>
|
</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:
|
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,```
|
```
|
||||||
|
'asset_url' => null,
|
||||||
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue