id(); $table->foreignIdFor(User::class, 'author_id'); $table->string('title', 200); $table->string('slug', 200); $table->text('content'); $table->string('link', 50)->nullable(); $table->unsignedInteger('view')->default(0); $table->timestamp('created_at')->useCurrent(); $table->timestamp('updated_at')->nullable()->useCurrentOnUpdate(); $table->softDeletes(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('news'); } };