文章关联多分类

This commit is contained in:
2021-04-02 10:35:51 +08:00
parent 28035e7a26
commit 96793afeec
20 changed files with 334 additions and 431 deletions

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateArticleCategoriesTable extends Migration
{
/**
* Run the migrations.
* @return void
*/
public function up()
{
Schema::create('article_category', function (Blueprint $table) {
$table->foreignId('article_id');
$table->foreignId('category_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
* @return void
*/
public function down()
{
Schema::dropIfExists('article_categories');
}
}