Skip to content
Draft
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ai/inertia-laravel/core.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Inertia Core

- Inertia.js components should be placed in the `resources/js/Pages` directory unless specified differently in the JS bundler (vite.config.js).
- Inertia.js components should be placed in the `resources/js/pages` directory unless specified differently in the JS bundler (vite.config.js).
Copy link
Member

@pushpak1300 pushpak1300 Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antojdprop thanks for the PR.

I thought about this a bit more. Hardcoding the path will break for Laravel 11 starter kits (Jetstream, Breeze, etc). Instead of doing that, can we detect the path dynamically at runtime?

For example, we could use something like:

preg_match('/[pP]ages/', $appContents, $matches);

If we detect it in any of the expected files (in priority order), we use that. If we cannot detect it, we fall back to generic wording:

"Inertia pages are stored in resources/js/ unless specified differently in the JS bundler (vite.config.js)."

That way it works across versions without assuming folder structure.

- Use `Inertia::render()` for server-side routing instead of traditional Blade views.
- Use `search-docs` for accurate guidance on all things Inertia.

Expand Down