File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
resources/views/components Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 11<?php
22use Illuminate\Database\Migrations\ Migration ;
3+ use Illuminate\Database\Migrations\ Migrator ;
34use Illuminate\Database\Schema\ Blueprint ;
45use Illuminate\Support\Facades\ Schema ;
56use Illuminate\Support\Facades\ DB ;
67use Illuminate\Support\Facades\ File ;
8+ use Database\Seeders\ ButtonSeeder ;
79use App\Models\ Page ;
810
911 // run before finishing:
130132
131133 /* Updates button database entries */
132134 Schema:: disableForeignKeyConstraints ();
133- try {Artisan:: call (' migrate' , [' --force' => true ]);} catch (exception $e ) {}
135+ try {
136+ $migrator = app (' migrator' );
137+ $migrator -> run (database_path (' migrations' ), [' --force' => true ]);
138+ } catch (exception $e ) {}
134139 try {DB:: table (' buttons' )-> delete ();} catch (exception $e ) {}
135140 try {DB:: table (' buttons' )-> truncate ();} catch (exception $e ) {}
136- try {Artisan:: call (' db:seed --class="ButtonSeeder" --force' );} catch (exception $e ) {}
141+ try {
142+ $seeder = new ButtonSeeder ();
143+ $seeder -> run ();
144+ } catch (exception $e ) {}
137145 Schema:: enableForeignKeyConstraints ();
138146
139147 try {
You can’t perform that action at this time.
0 commit comments