use IlluminateDatabaseSchemaBlueprint;
use IlluminateSupportFacadesSchema;
Schema::table('flights', function (Blueprint $table) {
$table->softDeletes();
});
Schema::table('flights', function (Blueprint $table) {
$table->dropSoftDeletes();
});
Comment::where('post_id',$id)->delete();
// in down migration
public function down()
{
Schema::table('package_types', function (Blueprint $table) {
AppModelsPackageType::query()->where('id','gt',1)->delete();
});
}
use IlluminateDatabaseSchemaBlueprint;
use IlluminateSupportFacadesSchema;
Schema::table('flights', function (Blueprint $table) {
$table->softDeletes();
});
Schema::table('flights', function (Blueprint $table) {
$table->dropSoftDeletes();
});
Comment::where('post_id',$id)->delete();
// in down migration
public function down()
{
Schema::table('package_types', function (Blueprint $table) {
AppModelsPackageType::query()->where('id','gt',1)->delete();
});
}