Laravel is known as "The PHP Framework For Web Artisans". Visit Laravel's website for more information about this versatile PHP framework.
Installing Laravel is not very difficult if you know the right commands.
Install Homebrew
Visit http://brew.sh
Copy and paste in the following command:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install PHP with Homebrew
Find PHP 7
brew search php7
Install PHP 7
brew install homebrew/php/php70
Install mcrypt
brew install homebrew/php/php70-mcrypt
Find MySQL
brew search mysql
Install MySQL
brew install mysql
Install Composer
- Visit https://getcomposer.org
- Click Download
- Run the commands found in your terminal
- php composer-setup.php --install-dir=bin --filename=composer
Make Composer globally accessible
mv composer.phar /usr/local/bin/composer
Setup a new Laravel App
Download the laravel installer and make it available globally:
composer global require "laravel/installer"
Go to the directory you want to install your app and type:
laravel new blog
Run a Local Development Server
This will create a local development server at http://localhost:8000
php artisan serve
Create a new migration
This will create a new migration file in /databases/migrations/ for creating a tasks table.
php artisan make:migration create_tasks_table --create tasks