manoos
manoos

Reputation: 1735

How to solve error while using Laravel 7 with livewire 1.0.13

I am trying to use Livewire 1.013 in my Laravel 7 application. I just installed livewire in my package. I am using xampp apache server. So, my project URL is like http://localhost/Projects/testproject/public .

When I do inspect the page that included with @livewireStyles and @livewireScripts, I am getting net::ERR_ABORTED 404 (Not Found) error. I did php artisan vendor:publish --tag=livewire:config and added @php artisan vendor:publish --force --tag=livewire:assets --ansi in composer.json file. The I executed composer dump-autoload . The error still exists. Can anyone help me to solve this issue?

Instead of custom project URL, if I do PHP artisan ser with URL of http://127.0.0.1:8000/ it works fine for me. But, in my case I have different project s and I have to use xampp apcahe.

Could you please help me to solve this?

Thanks in Advance ! Manu

Upvotes: 1

Views: 3097

Answers (1)

Ahmad Azizi
Ahmad Azizi

Reputation: 21

I had this problem too. You can publish the Livewire config into your Laravel config directory:

php artisan vendor:publish --tag=livewire:config

Then change the asset_url value in the config/livewire to the root or public directory of your app to something like this:

http://localhost/Projects/testproject/public

Upvotes: 2

Related Questions