Laravel cheatsheet (MAIN)
Commons commands
// Database migration
$ php artisan migrate
// Data seed
$ php artisan db:seed
// Create table migration
$ php artisan make:migration create_products_table
// Create from model with options:
// -m (migration), -c (controller), -r (resource controllers), -f (factory), -s (seed)
$ php artisan make:model Product -mcf
// Create a controller
$ php artisan make:controller ProductsController
// Update table migration
$ php artisan make:migration add_date_to_blogposts_table
// Rollback latest migration
php artisan migrate:rollback
// Rollback all migrations
php artisan migrate:reset
// Rollback all and re-migrate
php artisan migrate:refresh
// Rollback all, re-migrate and seed
php artisan migrate:refresh --seedCreate and update data tables (with migrations)
Models
Factory
Seed
Running Seeder
Eloquent ORM
Routes
Cache
Controllers
Template
Database direct access no model
Helpers
Flash & Session
HTTP Client
Storage
Install a project from github
Heroku deployment
Rest API
API Resource
API Resource definition file
API Controller
API Token authentication
Last updated