Short introduction to web application development
The PHP Framework For Web Artisans
Laravel is a high-level PHP MVC framework. It is also the most used PHP framework today. For more information, click here.
This guide will help you setup your local development environment for Laravel, and it applies to setting up Lumen as well.
Laravel Valet and Laravel recommends using Nginx. Follow the nginx installation instructions here.
You can also choose Apache as the web server.
Follow the MariaDB installation instructions here.
Follow the PHP installation instructions here.
OR, you can rip the benefit of using Fedora, and install composer directly instead. This will install PHP, and all the required extensions/libraries needed.
# It will install all required extensions, perk of Fedora $ sudo dnf install composer
Your web server needs to be restarted after installing PHP package.
We will need to set it up for easier development. Valet is original designed for MacOS by the Laravel Team; Valet Linux is a port to that. It setups up the neccesary environments for PHP Development, including a test domain. Please do not run valet as root. For More Information, you can check them out here: Valet Linux and Laravel Valet
# Place the ~/.config/composer/vendor/bin directory in your PATH so the composer # global executable can be located by your system. $ echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> ~/.bashrc # Install valet $ composer global require cpriego/valet-linux # Initialize valet $ valet install
# Install Laravel Installer $ composer global require "laravel/installer" # use Laravel Installer to Create a new Laravel Project $ laravel new ProjectName
$ cd ProjectName $ cp .env.example .env #Editing your environment file $ gedit .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/ # or use valet $ valet park $ valet link DOMAIN # Now visit http://DOMAIN.test/
$ valet secure # Now visit https://DOMAIN.test/
$ valet share