Skip to main content
Version: 1.0

Laravext Concepts

Learn about the important Laravext concepts!

📄️ Router

The Laravext router follows the same pattern as Next.js' App Router. Each directory will be, in most cases, a url segment that might be a page. For a directory to be a page it must contain a page.(jsx|tsx|js|ts|vue|ts|js) file, and other file conventions from Next.js are available. Every time an automagically generated route is accessed, the application will load the default root view (which can be overwritten for a specific route, if necessary). This route view might extend a layout or not, depending on your needs, and must contain a @nexus blade directive. The createLaravextApp/createLaravextSsrApp function at the app.(js/ts/jsx/tsx)/ssr.(js/ts/jsx/tsx) (or whoever you named these files) will then look for every nexus in the DOM (although it'd usually only make sense to have one), and render the page component of that URL path.