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

Katara78's avatar

is Laravel 11 and inertiajs even working ?!

hey guys I have been developing an application using Laravel 10 and inertia js (started from Breeze starting kit)

days passed and I updated that to Laravel 11 and everything is new everything worked perfectly in locally and boom application was done when I wanted to move to production and host the application I got so weird happenings for the application for example application getting reloaded twice it giving error not useable at all and csrf too is not working at login form basically its mess for example I'm sharing one problem as two images here

https://ibb.co/DpRBWdJ https://ibb.co/Sv0MSPG

the application turns to that error in a matter of milliseconds cannot read properties of null and the error is not stable it sometimes says it cannot read properties of something because t is null and again a is null some stuff like that

we tried a lot of stuff nothing helped everything works locally even without npm run dev

but the weird part is I wiped the server did installed the breeze starter kit and boom! the same errors happened ! so basically it's not related to our code I guess! Has anyone faced something like this ?! with Laravel inertia js ?! should I roll back the versions or is it not related to versions ?! what do you guys think ?!

0 likes
7 replies
martinbean's avatar

@katara78 I think it’s something related to your code, as I have a project using Laravel 11.x and Inertia.js and works just fine.

Katara78's avatar

@martinbean thats so weird as i mentioned earlier I even tried with fresh breeze installation ! can it be anything related to nginx config ?! i tried laravel 10 breeze inertiajs and it was working fine I tried with laravel blade it was working fine but only with laravel 11 and inertiajs I face this issue and as I told its fresh installation

jlrdw's avatar

@Katara78 Look at the chapter on middleware, it will explain how to set it for laravel 11.

Katara78's avatar

@jlrdw where is that i can't see ! can you share link please ?!

Katara78's avatar

@martinbean tnx for your help but im totally following that as I told earlier its breeze base installer also I dig deep in that now found out its working without CDN other than cloudflare also one problem some mobiles face the problems even with cloudflare cdn that's so weird bug

Snapey's avatar

@Katara78

because t is null and again a is null some stuff like that

because it is your code, and some stuff like that

You cannot possibly expect us to solve your issues based purely on your description

Please or to participate in this conversation.