Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

eyantra's avatar

Laravel + InertiaJs deployment ..

Hello,

I have created a project using Laravel 8 + InertiaJs.

As instructed on site, i have created app.blade.php file having:

<link href="{{ mix('/css/app.css') }}" rel="stylesheet" />
<script src="{{ mix('/js/app.js') }}" defer></script>

for above when i check the pages while running: npm run hot, css and js load perfectly.

But after npm run dev/prod, not getting css file correctly.

What am i doing wrong here ??

0 likes
1 reply
eyantra's avatar

Do i need to change,

{{ mix('/css/app.css') }} => {{ asset('/css/app.css') }}
{{ mix('/js/app.js') }} => {{ asset('/js/app.js')

while deploying the project ??

Please or to participate in this conversation.