From a78d4713748b5b210828be7799cab3812ea34cbd Mon Sep 17 00:00:00 2001 From: Julian Prieber Date: Thu, 25 May 2023 17:15:43 +0200 Subject: [PATCH] Improved compatibility Now running seeder and migrations without console commands --- resources/views/components/finishing.blade.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/resources/views/components/finishing.blade.php b/resources/views/components/finishing.blade.php index 6f060ef..5694542 100644 --- a/resources/views/components/finishing.blade.php +++ b/resources/views/components/finishing.blade.php @@ -1,9 +1,11 @@ true]);} catch (exception $e) {} + try { + $migrator = app('migrator'); + $migrator->run(database_path('migrations'), ['--force' => true]); + } 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) {} + try { + $seeder = new ButtonSeeder(); + $seeder->run(); + } catch (exception $e) {} Schema::enableForeignKeyConstraints(); try {