This is application is made for demonstrating features of Laravel, and to help one get started with framework quickly.
- Download and install XAMPP from https://www.apachefriends.org/download.html (7.1.7 as of this writing)
- Download and install Composer from https://getcomposer.org/download/ (1.4.2 as of this writing)
- Install Laravel using Composer via command prompt:
composer global require "laravel/installer"
- Ensure
$HOME/.composer/vendor/bin
is added to Path (should already be done by default, but worth checking)
- Create an application directory anywhere you like via command prompt:
laravel new <appName>
- Import project directory in your favorite IDE and run
php artisan serve
to host the web application - Create new user and new database via phpmyadmin, update
.env
file with corresponding details - Run
php artisan migrate
and if it fails with error about key being too long, then drop all tables from the database, updateAppServiceProvider.php
as follows, and attempt migration again:use Illuminate\Support\Facades\Schema; ... public function boot() { Schema::defaultStringLength(191); }
- Run
php artisan make:auth
to generate scaffolding for authentication - Update
.env
file to set SMTP details for testing authentication features, using Gmail's SMTP Settings, and then runphp artisan serve
again to play around. - Use
php artisan make:model -mcr <Entity>
to create model, Migration, and Controller that works with the Resource. Then perform migration, updateModelFactory.php
to add new factory definition, seed database usingphp artisan tinker
, and add new routes toweb.php
for each of the methods in Controller to play around.
- Artisan commands and help
- Auth, Mail
- Routes
- Migrations, Eloquent Models, Relationships, DB Seeding, Eager Loading
- Controllers, Route-Binding, returning JSON
- Blade Views and Layouts
- Carbon, CSRF Tokens, Form Validation
Session Flash, View Composer, Middleware, Events, Localization, Task Scheduling, Queues, APIs