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:
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.
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 McMurray is a freelance PHP developer. Experienced in PHP, Laravel and WordPress he can code anything you need.
Based in Plettenberg Bay, Western Cape I am available for PHP, Laravel or WordPress freelance jobs in Johannesburg, Pretoria, Cape Town, Port Elizabeth. I also often do remote PHP freelance work all over South Africa and the rest of the world.