Creating a new laravel site
Having installed Laravel you’ll now want to create your first Laravel website.
Creating the new Laravel site
In the command line navigate to the parent directory which contains all your web projects. On my Ubuntu system my projects are all in /var/www/html, so on the command line:
cd /var/www/html
Decide on a name for your project. We’ll call ours my-cool-website. Now run the new command from the command line like this:
laravel new my-cool-website
At this stage with a fresh Laravel installation and having just run the new command you can check the site using Laravel’s built in server by running artisan’s serve command:
php artisan serve
You should get the reply that the server has started along with a URL including a port number. Copy that and paste into a browser.
Error
At this stage you’ll probably encounter the error “No application encryption key has been specified.”. To fix this type the artisan command to set the encryption key:
php artisan key:generate
John, a seasoned Freelance Full Stack Developer based in South Africa, specialises in delivering bespoke solutions tailored to your needs. With expertise in back end languages and frameworks, PHP, Laravel and Golang and Front end frame words Vue3, Nuxt3 as well as Angular, I am equipped to tackle any project, ensuring robust, scalable, and cutting-edge outcomes.
My comprehensive skill set enables me to provide exceptional freelance services both remotely and in person. Whether you’re seeking to develop an innovative application or require meticulous refinement of existing systems, I am dedicated to elevating your digital presence through unparalleled technical prowess and strategic development methodologies. Let’s connect to transform your vision into reality.