1

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

2
  • Sounds like your projects root directory path in Apache is incorrect. You shouldn't have public in your url. Commented Apr 27, 2020 at 2:05
  • @DigitalDrifter: Other modules in laravel is working fine... for example my login path is localhost/Projects/testproject/public/login.. it shows login page... Only problem with livewire... I used public folder, because in apache, we have to click on project public folder to go to home page Commented Apr 27, 2020 at 3:18

1 Answer 1

2

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.