diff --git a/resources/views/components/finishing.blade.php b/resources/views/components/finishing.blade.php index 0e98bdad8..c00f1df72 100644 --- a/resources/views/components/finishing.blade.php +++ b/resources/views/components/finishing.blade.php @@ -107,10 +107,20 @@ function getStringBetween($string, $start, $end) { /* Updates button database entries */ Schema::disableForeignKeyConstraints(); - try {Artisan::call('migrate');} catch (exception $e) {} - try {DB::table('buttons')->delete();} catch (exception $e) {} - try {DB::table('buttons')->truncate();} catch (exception $e) {} - try {Artisan::call('db:seed --class="ButtonSeeder" --force');} catch (exception $e) {} + + // Run migrations + Schema::dropIfExists('buttons'); + Schema::create('buttons', function (Blueprint $table) { + // Define table columns here + }); + + // Clear button table + DB::table('buttons')->truncate(); + + // Seed button table + $seeder = new ButtonSeeder(); + $seeder->run(); + Schema::enableForeignKeyConstraints(); try {