To create a project
composer create-project --prefer-dist laravel/laravel blog
Databse Initial table setup
php artisan migrate
To avoid key long error ( AppServiceProvider )
use Illuminate\Support\Facades\Schema;
Schema::defaultStringLength(191);
Authentication Scaffolding
composer require laravel/ui
To create necessary controllers, routes and views for auth
php artisan ui bootstrap --auth
To compile css, dev assets and watcher to update changes
npm install
npm run dev
npm run watch
To create a new controller
php artisan make:controller PollsController
To create a new controller with resource
php artisan make:controller PollsController --resource
To create a new controller with resource and model
php artisan make:controller PollsController --resource --model=Poll
To make model and migration file
php artisan make:model Poll -m
To create new Factory
php artisan make:factory PollFactory
To Drop all tables and re-run migrations
php artisan migrate:fresh --seed