Livewire integration
Add the following to your TenancyServiceProvider
’s boot()
method:
Livewire::setUpdateRoute(function ($handle) { return Route::post('/livewire/update', $handle) ->middleware( 'web', 'universal', InitializeTenancyByDomain::class, );});
FilePreviewController::$middleware = [ 'web', 'universal', InitializeTenancyByDomain::class];
And update the file upload route middleware:
'livewire.temporary_file_upload.middleware' => [ 'throttle:60,1', 'universal', InitializeTenancyByDomain::class],
If you use a different identification middleware, use it in place of InitializeTenancyByDomain
in the code snippets above.