make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap(); Artisan::call('migrate:refresh'); $files = $app->make('files'); if (! $files->exists(storage_path('install.lock'))) { $files->put(storage_path('install.lock'), ''); } return $app; } /** * @param \App\Models\User|string $role * @return $this */ public function actAs($role) { if (is_string($role)) { if ($role == 'normal') { $role = factory(\App\Models\User::class)->create(); } else { $role = factory(\App\Models\User::class, $role)->create(); } } return $this->actingAs($role); } }