inertia-laravel
inertia-laravel copied to clipboard
Add `views/pages` to the default testing page paths
This PR adds the resources/views/pages path to the default testing page paths.
The reason for this is that I personally believe pages should be in the resources/views/pages directory instead of the resources/js/Pages one:
- Having
jsas the main directory does not make much sense, as it is common to not have any JavaScript files - I dig the
kebab-caseconvention (but this is compatible withcamelCasetoo), inspired by codebases like Vite, Vue and the default Laravel blade one - I'm promoting this architecture with Laravel Vite, but I kept
resources/jsin the defaults too - My Inertia preset scaffolds this architecture as well
Note that this is just a convenience addition to avoid having to fix it up manually. It doesn't change the previous behavior and should not bring any false positives either.
- Related: https://ninjaparadedigital.com/blog/inertia-js-testing-configurations