public function up()
{
Schema::create('tables', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->integer('guest_number');
$table->string('status')->default('avaliable');
$table->string('location');
$table->timestamps();
});
}
php artisan make:model Category -m
php artisan make:model Menu -m
php artisan make:model Table -m
php artisan make:model Reservation -m
php artisan migrate
1. create_categories_table.php
public function up()
{
Schema::create('categories', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->text('description');
$table->string('image');
$table->timestamps();
});
}
2. create_menus_table.php
public function up()
{
Schema::create('menus', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->text('description');
$table->string('image');
$table->decimal('price', 10, 2);
$table->timestamps();
});
}
3. create_tables_table.php
public function up()
{
Schema::create('tables', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->integer('guest_number');
$table->string('status')->default('avaliable');
$table->string('location');
$table->timestamps();
});
}
4. create_reservations_table.php
public function up()
{
Schema::create('reservations', function (Blueprint $table) {
$table->id();
$table->string('first_name');
$table->string('last_name');
$table->string('email');
$table->string('tel_number');
$table->dateTime('res_date');
$table->unsignedBigInteger('table_id');
$table->integer('guest_number');
$table->timestamps();
});
}
'프로젝트 > [Laravel Breeze] 레스토랑 예약 프로그램' 카테고리의 다른 글
[laravel] 6. Route와 create 페이지 (0) | 2022.07.01 |
---|---|
[laravel] 5. controller 생성 (0) | 2022.06.30 |
[Laravel] 3. 네비게이션 버튼 추가 (0) | 2022.06.30 |
[Laravel] 2. Admin Middleware 셋팅 (0) | 2022.06.30 |
[Laravel] 1. Breeze 설치와 개발 초기환경(admin seeder) 셋팅 하기 (0) | 2022.06.30 |