Installation requirements for Laravel
Now, it's time to learn laravel however we are newbie and we don't know what to do? Well we will take baby steps and learn slowly. First thing is to know how to install laravel framework on our computer.
Before you install laravel on your computer or local machine we have to know if laravel depends on something. Usually every software or framework somehow depends on any other tools or language.
Followings are some of the dependencies of Laravel framework. If you do not have this dependecies on your computer before you install laravel. The installation process will throw some errors.
We need to have following things or dependecies on our local machine before we start installation process:
- PHP >= 7.0
- MCrypt PHP Extension
- PHP Json Extension
- OpenSSL PHP Extension
- PDO PHP Extension
- MbString PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
- Composer ( A tool to mange PHP dependencies )
Once we have above dependencies install we can process with Laravel 5.5 Installation. Follow the steps below on your mac or linux terminal window:
# install laravel installer composer global require "laravel/installer" # Mac OS open ~/.bash_profile file # And add following line export PATH=$PATH:$HOME/.composer/vendor/bin source ~/.bash_profile # On Linux open ~/.profile file # And add following line export PATH=$PATH:$HOME/.config/composer/vendor/bin source ~/.profile # Now close your terminal window and # Re-open the terminal and run following command laravel new project_name # Go to created project_name dir cd project_name # if .env file does not exist # copy .env.example file content to .env file # generate unique identifier php artisan key:generate # assign proper permissions for our web server # for linux based os or mac os run HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1` sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX storage sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX storage sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX bootstrap sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX bootstrap # Now, run your laravel app php artisan serve # open your browser now and hit # http://localhost:8000 # you will see welcome page
That is it now you are all set with your local environment for laravel app.
News and Updates
Subscribe to our newsletter and receive the latest news from TheThemeio.
- Github Pages
- Remote Data
- Organizing AngularJS
- PHP Development Tools
- What is AngularJS?
- Model and Controller
- Service Workers