inertiajs / inertia-laravel

The Laravel adapter for Inertia.js.
https://inertiajs.com
MIT License
2.03k stars 227 forks source link

Auth middleware not working in custom laravel package routes file #521

Closed ushanpramix closed 1 year ago

ushanpramix commented 1 year ago

I created custom laravel package inside "packages/pramix/XAuth" folder and it's routes.php file and here the folder structure,

image

I have added a get route into routes.php that has auth middleware but when I go that route its return response code 302 response.

image

image

Without auth middleware its works fine!

Laravel: 9.19 php: 8.2.0 vue: 3..2.41 tightenco/ziggy: 1.0 inertiajs/inertia-laravel: ^0.6.8

ushanpramix commented 1 year ago

It's totally my fault. 🥴 I forgot to put web middleware. Sorry for your inconvenience