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

varcorb's avatar

laravel 11 dev and inertia.js not creating middleware

Aloha,

After creating a fresh laravel 11 app I am trying to add inertia.js. Following the docs I run composer require inertiajs/inertia-laravel which is successful and then when i try to create the middleware using php artisan inertia:middleware I get the following error: ERROR There are no commands defined in the "inertia" namespace. . This works for me on laravel 10. Any suggestions? I know that laravel 11 is not out yet.

0 likes
3 replies
JussiMannisto's avatar
Level 50

The main version of inertiajs/inertia-laravel is not compatible with L11. What you got was some old version of the package. Remove it, then install the dev-master version:

composer require inertiajs/inertia-laravel dev-master

But keep in mind that both L11 and the adapter package are still in development.

3 likes

Please or to participate in this conversation.