id(); $table->foreignId('user_id')->constrained()->cascadeOnDelete(); $table->foreignId('category_id')->constrained()->cascadeOnDelete(); $table->unsignedTinyInteger('privacy')->comment('1:Public, 2:Private')->default(1); $table->unsignedTinyInteger('status')->comment('1:Draft, 2:Publish')->default(1); $table->text('description')->nullable(); $table->bigInteger('created_by')->nullable()->length(20); $table->bigInteger('updated_by')->nullable()->length(20); $table->text('location')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('posts'); } }