Skip to content

How to Create Single Page Application in Laravel and Inertia JS

Shanaya Saxena 1 min read

What is SPA

PWA stands for Progressive Web Applications

Features of SPA

  1. Installable
  2. Works Offline

What are SPAs

SPA stands for Single page applications.

In SPA, the DOM is loaded once and only content changes as the user interacts with the application.

Create Laravel Project

Install Inertia

Unlike Normal anchor tag links, inertia provides a Link component that loads content asynchronously without loading the page

How to Use inertia links

Troubleshooting Tips

#1 Inertia URLs show Internal Server Error

Go to etc/apache2/ and update apache2.conf file as shown below

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

#2 How to Change the Apache Root directory

Go to etc/apache2/sites-enabled and update the 000-default.conf file as shown below

DocumentRoot /var/www/html/path-to-directory/

Shanaya Saxena

Empowering Developers with Years of Coding Experience

Keep reading