Reputation: 83
I am using Laravel 8. "wire:model" also not working because of this.
Upvotes: 1
Views: 4846
Reputation: 4688
Just the following code to your admin or control panel routes:
use Livewire\Controllers\HttpConnectionHandler;
Route::post('livewire/message/{name}', [HttpConnectionHandler::class, '__invoke']);
And remember to override the url using this one linear:
<script>
window.livewire_app_url = '{{route('admin.index')}}';
</script>
More detailed answer could be found here
Laravel - Livewire, how to customize the global message URL?
Upvotes: 0
Reputation: 1
You need to setup the livewire app url in config/livewire.php
.
'app_url' => url('/'),
Upvotes: 0
Reputation: 12391
you need to setup livewire base url
in config/livewire.php
'asset_url' => env('APP_URL', 'http://localhost'),,
then in .env
APP_URL=your_app_url
Upvotes: 4