Update livewire.blade.md

This commit is contained in:
FelipeVeiga 2022-06-21 13:46:42 -03:00 committed by GitHub
parent 6143b9e751
commit eee2cb7b17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,
```