Home > Mobile >  What is the "Cars/Index" style with slash in Inertia partial reload?
What is the "Cars/Index" style with slash in Inertia partial reload?

Time:08-11

What is "Cars"? Model or something else? Index is most probably the controller method. Why is slash used, and what does it mean? Also if Cars is referring to the cars table, then why is it capitalized?

CodePudding user response:

Assuming you are using Vue:

Cars is referring a folder (resources/js/Pages/Cars) and Index is referring a component (resources/js/Pages/Cars/Index.vue).

So doing return inertia('Cars/Index'); (in a PHP file, for example, one of your controllers) will call the Inertia helper to render that specific component.

  • Related