Start the application

composer create-project laravel/laravel [tenduan] –prefer-dist

Sau khi chạy composer thì trong htdoc sẽ có thư mục tên dự án của bạn (ở đây tôi đặt tên là hellolaravel)

 

 

buiding the database schema

Tạo migration:

Tạo thủ công migration:     database/migration/:

Tạo bằng lệnh:

php artisan make:migration create_breeds_table –create=breeds

 

timesstamps: thong tin thoi gian tao va cap nhat

migration:rollback quay lai

 

key: laravel migration

chuong trinh quan ly mysql: navicat

slack

Tạo seeder: (nhập dữ liệu vào bảng)

php artisan make:seeder BreedSeeder

Chạy seeder (run)

php artisan db:seed

php artisan db:seed –class=BreedSeeder

https://www.cyberciti.biz/faq/mysql-command-to-show-list-of-databases-on-server/

Quay lai 1 migration:

$php artisan migrate:rollback

Reset 1 migration:

$php artisan migrate:reset

Back to the routes

Tạo 1 model tên Breed và Cat

$php artisan make:model Breed

$php artisan make:model Cat

Đưa boottrap vào laravel:

boottrap: getboottrap.com->tai->bo vao public cua code

 

Cài lại link_to trong laravel:

$composer require “laravelcollective/html”

 

 

config->app.php

‘Input’ => Illuminate\Support\Facades\View::class,