Starting your first Laravel project

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.
Search for a command to run...

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.
You are more than welcome 🤩
Most of you know me for my consistency, a golden arrow in my blog series. I've written 1000 articles in 1008 days! Almost an article a day, and my honeymoon was the only holiday I ever took. I'm super proud of this achievement; it has been a fantasti...

It's not the first time I'll be talking about community. I think it's an essential aspect of any successful tool. This shows in my previous explorations of Astro, Medusa, and now Vendure as well. All these products thrive in a super open, welcoming, ...

The cool part about Vendure is how easy it is to set up and how abstract each layer is. Basically, we get the following elements: External database Server Worker Admin UI Frontend While this is amazing, it also brings a bit of complexity when it co...

The previous article looked at customizing Vendure on a data and process level. In this article, we'll look at customizing emails, as they are often a big part of a webshop system. We'll be looking at two different layers of customization for customi...

Even though Vendure is a pretty significant project out of the box, in some cases, we might want to go in and modify some elements to work to our specific use case. In this article, I'll take a high-level look at some elements we can customize within...

Today I'll be showing you how easy it is to get started with a Laravel project.
Laravel is a PHP framework. For me, it focuses on good practices and clean code.
The super cool part about Laravel 8.0 is that it now comes with a simple terminal command to build an app that runs in Docker!
Before we start, make sure you have Docker desktop installed.
Once you have Docker installed and setup, we can open the terminal and execute the following command.
curl -s https://laravel.build/laravel-app | bash
Running this command will create a laravel-app folder in the current folder you in.
You can change the name to whatever you need it to be, so your projects need to be called client-website run the following command.
curl -s https://laravel.build/client-website | bash
With this command, it will setup all the packages and even set your application key for you.
To run the application, we can simply cd into the directory and run the following command.
cd laravel-app
./vendor/bin/sail up
The first time the sail up command will take quite a while but don't worry any time after that, it will be quick.
Note: If you're on the new Mac M1, you need to change the
docker-compose.ymlfile. Changeimage: 'mysql:8.0'toimage: mariadb:10.5.8
Once everything is installed, you should see the following in your Docker desktop app.

And we should be able to view the application going to http://localhost.
Note: you might have to change the port if you already have a server running on port 80

And we even get a default Mailhog installation on port 8025:

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on Facebook or Twitter