芝麻web文件管理V1.00
编辑当前文件:/home/sditechnicalteam/public_html/vendor/froiden/laravel-installer/src/Helpers/DatabaseManager.php
sqlite(); return $this->migrate(); } /** * Run the migration and call the seeder. * * @return array */ private function migrate() { try { Artisan::call('migrate', ["--force" => true, '--schema-path' => 'do not run schema path']); } catch (Exception $e) { return $this->response($e->getMessage()); } return $this->seed(); } /** * Seed the database. * * @return array */ private function seed() { try { Artisan::call('db:seed'); } catch (Exception $e) { return $this->response($e->getMessage()); } return $this->response(trans('installer_messages.final.finished'), 'success'); } /** * Return a formatted error messages. * * @param $message * @param string $status * @return array */ private function response($message, $status = 'danger') { return array( 'status' => $status, 'message' => $message ); } /** * check database type. If SQLite, then create the database file. */ private function sqlite() { if (DB::connection() instanceof SQLiteConnection) { $database = DB::connection()->getDatabaseName(); if (!file_exists($database)) { touch($database); DB::reconnect(Config::get('database.default')); } } } }