Answers for "remove the table from the database in laravel migration"

0

Laravel Drop All Tables & Migrate

php artisan migrate:fresh

php artisan migrate:fresh --seed
Posted by: Guest on May-04-2021
0

delete rows by migration laravel

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();
        });
    }
Posted by: Guest on August-14-2021

Code answers related to "remove the table from the database in laravel migration"

Browse Popular Code Answers by Language