id(); $table->string('title'); $table->string('slug')->unique(); $table->text('content'); $table->string('image')->nullable(); $table->string('link')->nullable(); $table->string('tag')->nullable(); $table->enum('category', ['0', '1'])->default('0'); $table->integer('views')->default(0); $table->unsignedBigInteger('author_id'); $table->foreign('author_id')->references('id')->on('users'); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('news'); } };