Hello Human Being ...
Laravel is a PHP framework built on the beauty that is Symfony.
let's unpack that statement a bit.
We'll assume that you're familiar with the PHP language. A PHP framework is a system that helps you build applications faster and more efficiently by taking care of the base setup of any project. In essence, the framework handles how you handle requests, show pages,and interact with your database.
This means that you don't have to setup anything from scaratch, it's all laid out for you to add and modify.
Let's start by updating your Ubuntu OS. Open your terminal and
ctrl + alt + t
Then this command:
sudo apt-get update
This will ensure that your packages are upto date within their versions.
Next we'll need to install Composer. Think of composer as component management tool. Essentially; it determines which version of each component or package is used in your Laravel build. For instance, you can set the version of your PHP, PHPUnit etc. It orchestrates all of that, as well as external plugins and packages; hence the name Composer.
To install Composer please start by upgrading your version of Ubuntu.
sudo apt-get update
Only upgrade if you're ready to:
sudo apt-get upgrade
Next we'll install Composer and use it to install our glorious Laravel package.
sudo apt-get install composer
This will start up the package download and start installing.
When it's done you'll need to export the path of the composer install to your OS so it knows to start up when you run
composer, otherwise you'd have to specify the path everytime you run it.
Now run composer in a new terminal tab and voila! Composer in all it's glory.
Pleas note that for every Laravel project you'll need to install another laravel build. Laravel is not a unit, it's a collection of files like any other framework.
composer install laravel\laravel myproject
This will create a Laravel project for you in the folder named myproject
"Hello Human Being"The Village Geek
"Alright, alright, alright ..." - Kevin Hart's Dad
Be sure to watch the prompt as it downloads and installs. To test your Laravel:
php artisan serve
open the provided localhost url in your browser and you have Laravel!
Cape Town, South Africa