Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function up() {
- Schema::create('book_category', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('book_id')->unsigned()->nullable();
- $table->integer('category_id')->unsigned()->nullable();
- $table->timestamps(); $table->foreign('book_id')->references('id')->on('books');
- $table->foreign('category_id')->references('id')- >on('categories');
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement