The PHP Framework For Web Artisans
Laravel is a high-level PHP Web framework. To install Laravel the following needs to be satisfied:
$ sudo dnf install httpd
# Setup Apache to automatically start upon system boot
$ sudo systemctl enable httpd.service
# Then to boot the server
$ sudo systemctl start httpd
# And stop with
$ sudo systemctl stop httpd
Follow the MariaDB installation instructions here.
Follow the PHP installation instructions here.
# Laravel required PHP extensions.
$ sudo dnf install php php-common php-cli php-pdo php-mbstring php-zip php-xml
# Restart Apache
$ sudo systemctl restart httpd
We will need composer to install laravel and it’s dependencies
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
$ chmod +x /usr/local/bin/composer
$ composer -V
$ composer global require "laravel/installer"
# Place the ~/.config/composer/vendor/bin directory in your PATH so the laravel
# executable can be located by your system.
$ echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> ~/.bash_profile
Now you can create a laravel project with the commands
$ laravel new ProjectName
$ cd ProjectName
$ cp .env.example .env
$ nano .env
Edit the .env file with DB_* lines with the correct info
DB_HOST=localhost
DB_DATABASE=laravel_equals_winning
DB_USERNAME=Chur
DB_PASSWORD=Chur1
$ php artisan serve
# Laravel development server started on http://localhost:PORT/