@@ -72,8 +72,8 @@ |
||
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
| 75 | - * check database type. If SQLite, then create the database file. |
|
| 76 | - */ |
|
| 75 | + * check database type. If SQLite, then create the database file. |
|
| 76 | + */ |
|
| 77 | 77 | private function sqlite() |
| 78 | 78 | { |
| 79 | 79 | if(DB::connection() instanceof SQLiteConnection) { |
@@ -212,7 +212,7 @@ |
||
| 212 | 212 | $response = $databaseManager->migrateAndSeed(); |
| 213 | 213 | |
| 214 | 214 | return redirect()->route('KleisInstaller::stepFinal') |
| 215 | - ->with(['message' => $response]); |
|
| 215 | + ->with(['message' => $response]); |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | /** |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | 29 | $view->with('enable', $enable) |
| 30 | - ->with('title', $title) |
|
| 31 | - ->with('contents', $contents); |
|
| 30 | + ->with('title', $title) |
|
| 31 | + ->with('contents', $contents); |
|
| 32 | 32 | } |
| 33 | 33 | } |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | public function handle() |
| 63 | 63 | { |
| 64 | 64 | $accounts = Account::where('status', Account::ACCOUNT_ENABLE) |
| 65 | - ->orderBy('netlogin', 'desc')->get(); |
|
| 65 | + ->orderBy('netlogin', 'desc')->get(); |
|
| 66 | 66 | |
| 67 | 67 | if ($accounts->isEmpty()) { |
| 68 | 68 | $this->info("No accounts to export"); |
@@ -55,32 +55,32 @@ |
||
| 55 | 55 | * |
| 56 | 56 | * @return mixed |
| 57 | 57 | */ |
| 58 | - public function handle() |
|
| 59 | - { |
|
| 60 | - $categories = Category::get(); |
|
| 58 | + public function handle() |
|
| 59 | + { |
|
| 60 | + $categories = Category::get(); |
|
| 61 | 61 | |
| 62 | - if ($categories->isEmpty()) { |
|
| 63 | - $this->info("No categories to export"); |
|
| 64 | - return; |
|
| 65 | - } |
|
| 62 | + if ($categories->isEmpty()) { |
|
| 63 | + $this->info("No categories to export"); |
|
| 64 | + return; |
|
| 65 | + } |
|
| 66 | 66 | |
| 67 | - foreach ($categories as $category){ |
|
| 68 | - $name = static::stringNormalise($category->name); |
|
| 69 | - $filename = "{$this->exportFolder}/{$name}{$this->exportFileExt}"; |
|
| 70 | - $accounts = Account::where('status', Account::ACCOUNT_ENABLE) |
|
| 67 | + foreach ($categories as $category){ |
|
| 68 | + $name = static::stringNormalise($category->name); |
|
| 69 | + $filename = "{$this->exportFolder}/{$name}{$this->exportFileExt}"; |
|
| 70 | + $accounts = Account::where('status', Account::ACCOUNT_ENABLE) |
|
| 71 | 71 | ->where('category_id', $category->id) |
| 72 | 72 | ->orderBy('netlogin', 'desc') |
| 73 | 73 | ->get(); |
| 74 | - Storage::disk('export')->put($filename, ''); |
|
| 75 | - $count = count($accounts); |
|
| 76 | - $bar = $this->output->createProgressBar($count); |
|
| 77 | - foreach ($accounts as $account) { |
|
| 78 | - Storage::disk('export')->prepend($filename, "{$account->netlogin}:{$account->netpass}"); |
|
| 79 | - $bar->advance(); |
|
| 80 | - } |
|
| 81 | - $bar->finish(); |
|
| 82 | - $url = Storage::disk('export')->path($filename); |
|
| 83 | - $this->info("\n{$count} accounts '{$category->name}' exported into file '{$url}'"); |
|
| 84 | - } |
|
| 85 | - } |
|
| 74 | + Storage::disk('export')->put($filename, ''); |
|
| 75 | + $count = count($accounts); |
|
| 76 | + $bar = $this->output->createProgressBar($count); |
|
| 77 | + foreach ($accounts as $account) { |
|
| 78 | + Storage::disk('export')->prepend($filename, "{$account->netlogin}:{$account->netpass}"); |
|
| 79 | + $bar->advance(); |
|
| 80 | + } |
|
| 81 | + $bar->finish(); |
|
| 82 | + $url = Storage::disk('export')->path($filename); |
|
| 83 | + $this->info("\n{$count} accounts '{$category->name}' exported into file '{$url}'"); |
|
| 84 | + } |
|
| 85 | + } |
|
| 86 | 86 | } |
@@ -55,32 +55,32 @@ |
||
| 55 | 55 | * |
| 56 | 56 | * @return mixed |
| 57 | 57 | */ |
| 58 | - public function handle() |
|
| 59 | - { |
|
| 60 | - $groups = Group::get(); |
|
| 58 | + public function handle() |
|
| 59 | + { |
|
| 60 | + $groups = Group::get(); |
|
| 61 | 61 | |
| 62 | - if ($groups->isEmpty()) { |
|
| 63 | - $this->info("No groups to export"); |
|
| 64 | - return; |
|
| 65 | - } |
|
| 62 | + if ($groups->isEmpty()) { |
|
| 63 | + $this->info("No groups to export"); |
|
| 64 | + return; |
|
| 65 | + } |
|
| 66 | 66 | |
| 67 | - foreach ($groups as $group){ |
|
| 68 | - $name = static::stringNormalise($group->name); |
|
| 69 | - $filename = "{$this->exportFolder}/{$name}{$this->exportFileExt}"; |
|
| 70 | - $accounts = Account::where('status', Account::ACCOUNT_ENABLE) |
|
| 67 | + foreach ($groups as $group){ |
|
| 68 | + $name = static::stringNormalise($group->name); |
|
| 69 | + $filename = "{$this->exportFolder}/{$name}{$this->exportFileExt}"; |
|
| 70 | + $accounts = Account::where('status', Account::ACCOUNT_ENABLE) |
|
| 71 | 71 | ->where('group_id', $group->id) |
| 72 | 72 | ->orderBy('netlogin', 'desc') |
| 73 | 73 | ->get(); |
| 74 | - Storage::disk('export')->put($filename, ''); |
|
| 75 | - $count = count($accounts); |
|
| 76 | - $bar = $this->output->createProgressBar($count); |
|
| 77 | - foreach ($accounts as $account) { |
|
| 78 | - Storage::disk('export')->prepend($filename, "{$account->netlogin}:{$account->netpass}"); |
|
| 79 | - $bar->advance(); |
|
| 80 | - } |
|
| 81 | - $bar->finish(); |
|
| 82 | - $url = Storage::disk('export')->path($filename); |
|
| 83 | - $this->info("\n{$count} accounts '{$group->name}' exported into file '{$url}'"); |
|
| 84 | - } |
|
| 85 | - } |
|
| 74 | + Storage::disk('export')->put($filename, ''); |
|
| 75 | + $count = count($accounts); |
|
| 76 | + $bar = $this->output->createProgressBar($count); |
|
| 77 | + foreach ($accounts as $account) { |
|
| 78 | + Storage::disk('export')->prepend($filename, "{$account->netlogin}:{$account->netpass}"); |
|
| 79 | + $bar->advance(); |
|
| 80 | + } |
|
| 81 | + $bar->finish(); |
|
| 82 | + $url = Storage::disk('export')->path($filename); |
|
| 83 | + $this->info("\n{$count} accounts '{$group->name}' exported into file '{$url}'"); |
|
| 84 | + } |
|
| 85 | + } |
|
| 86 | 86 | } |