Skip to main content
Wafy's Tools

Main navigation

  • Home
  • About
  • Framework Learning

Breadcrumb

  1. Home
  2. Updating my PHP Framework Knowledge.

Laravel - Your First Route

By Jeff , 22 May, 2026

Had to do a few things to my setup a bit to make things work a little better. Some things I might not need or need to change if I put this in production. Ran into a bit of CORS issue once I had to rebuild the project directory. Due to the Docker container I had a bit of an issue with the Vite configuration. It needed a couple things to get things working for the server that runs when you run dev with Composer. After some googling and a small chat with AI. I ended up adding the following to the vite.config.js file:

   server: {
        host: '0.0.0.0',
        strictPort: true,
        cors: true,
        hmr: {
            host: '127.0.0.1',
        },
   }

I also had to update package.json to add --host to the "dev": "vite" scripts line. I also needed to open the 5173 port in the docker-compose.yml. Which seemed to have helped. 

The composer run dev command that they have setup for the skeleton is quite useful and seems semi smart. When I updated the Vite configuration file, while it was running, it automatically reloaded Vite. It looks like when you save files it also reloads Vite. Hoping to dig into these a bit more later. 

As for the lesson. It was a quick run through the views and the routing. Laravel uses a different templating than Laminas. It is called Blade. It seems to look at a few things and a non-traditional PHP escaping. Looks to be a combination of some XML parsing and something else. I kind of like the ability to set the title and other variables in the view for the layout. Which I thought was interesting. 

The next lesson, talks about pushing to their production site Laravel Cloud. Which I really am not interested in. It is good that they have it, but not something I need. I still went through the lesson and just didn't bother to do the steps that weren't relevant to the the coding. 

Taxonomy
Javascript
PHP

Book navigation

  • Laravel - Getting Setup
  • Laravel - Your First Route
RSS feed