on
1. 라라벨 설치 및 데이터베이스 설정
1. 라라벨 설치 및 데이터베이스 설정
1. 라라벨 설치 V5.8
composer create-project laravel/laravel laravel58 --prefer-dist 5.8
2. 데이터베이스 계정 설정 .env
3. auth 생성
php artisan make:auth
4. Task모델과 마이그레이션 생성
php artisan make:model Task -m
5. Task Model 대량할당 설정
1 2 3 4 5 6 7 8 9 10 11
6. User Model Task 관계설정 추가
1 2 3 4 public function tasks() { return $this->hasMany(Task::class); } Colored by Color Scripter cs
7. 데이터 베이스 스키마 생성 TIMS_STAMP_create_tasks_table.php
1 2 3 4 5 6 7 Schema::create('tasks', function (Blueprint $table) { $table->bigIncrements('id'); $table->unsignedInteger('user_id'); $table->string('name'); $table->text('body'); $table->timestamps(); }); Colored by Color Scripter cs
8. 마이그레이션
php artisan migrate
9. 가짜데이터 삽입
10. 테스트아이디만들기
from http://anko3899.tistory.com/378 by ccl(A) rewrite - 2020-04-02 15:27:30