@@ -40,31 +40,31 @@ |
||
40 | 40 | * |
41 | 41 | * @return mixed |
42 | 42 | */ |
43 | - public function handle() |
|
44 | - { |
|
45 | - $categories = Category::get(); |
|
43 | + public function handle() |
|
44 | + { |
|
45 | + $categories = Category::get(); |
|
46 | 46 | |
47 | - if ($categories->isEmpty()) { |
|
48 | - $this->info("No categories to export"); |
|
49 | - return; |
|
50 | - } |
|
47 | + if ($categories->isEmpty()) { |
|
48 | + $this->info("No categories to export"); |
|
49 | + return; |
|
50 | + } |
|
51 | 51 | |
52 | - foreach ($categories as $category){ |
|
53 | - $name = static::stringNormalise($category->name); |
|
54 | - $filename = 'export/categories/' . $name . '.txt'; |
|
55 | - $accounts = Account::where('status', 1) |
|
52 | + foreach ($categories as $category){ |
|
53 | + $name = static::stringNormalise($category->name); |
|
54 | + $filename = 'export/categories/' . $name . '.txt'; |
|
55 | + $accounts = Account::where('status', 1) |
|
56 | 56 | ->where('category_id', $category->id) |
57 | 57 | ->orderBy('netlogin', 'desc') |
58 | 58 | ->get(); |
59 | - Storage::put($filename, ''); |
|
60 | - $count = count($accounts); |
|
61 | - $bar = $this->output->createProgressBar($count); |
|
62 | - foreach ($accounts as $account) { |
|
63 | - Storage::prepend($filename, "{$account->netlogin}:{$account->netpass}"); |
|
64 | - $bar->advance(); |
|
65 | - } |
|
66 | - $bar->finish(); |
|
67 | - $this->info("\n{$count} accounts '{$category->name}' exported into file 'storage/app/{$filename}'"); |
|
68 | - } |
|
69 | - } |
|
59 | + Storage::put($filename, ''); |
|
60 | + $count = count($accounts); |
|
61 | + $bar = $this->output->createProgressBar($count); |
|
62 | + foreach ($accounts as $account) { |
|
63 | + Storage::prepend($filename, "{$account->netlogin}:{$account->netpass}"); |
|
64 | + $bar->advance(); |
|
65 | + } |
|
66 | + $bar->finish(); |
|
67 | + $this->info("\n{$count} accounts '{$category->name}' exported into file 'storage/app/{$filename}'"); |
|
68 | + } |
|
69 | + } |
|
70 | 70 | } |
@@ -40,31 +40,31 @@ |
||
40 | 40 | * |
41 | 41 | * @return mixed |
42 | 42 | */ |
43 | - public function handle() |
|
44 | - { |
|
45 | - $groups = Group::get(); |
|
43 | + public function handle() |
|
44 | + { |
|
45 | + $groups = Group::get(); |
|
46 | 46 | |
47 | - if ($groups->isEmpty()) { |
|
48 | - $this->info("No groups to export"); |
|
49 | - return; |
|
50 | - } |
|
47 | + if ($groups->isEmpty()) { |
|
48 | + $this->info("No groups to export"); |
|
49 | + return; |
|
50 | + } |
|
51 | 51 | |
52 | - foreach ($groups as $group){ |
|
53 | - $name = static::stringNormalise($group->name); |
|
54 | - $filename = 'export/groups/' . $name . '.txt'; |
|
55 | - $accounts = Account::where('status', 1) |
|
52 | + foreach ($groups as $group){ |
|
53 | + $name = static::stringNormalise($group->name); |
|
54 | + $filename = 'export/groups/' . $name . '.txt'; |
|
55 | + $accounts = Account::where('status', 1) |
|
56 | 56 | ->where('group_id', $group->id) |
57 | 57 | ->orderBy('netlogin', 'desc') |
58 | 58 | ->get(); |
59 | - Storage::put($filename, ''); |
|
60 | - $count = count($accounts); |
|
61 | - $bar = $this->output->createProgressBar($count); |
|
62 | - foreach ($accounts as $account) { |
|
63 | - Storage::prepend($filename, "{$account->netlogin}:{$account->netpass}"); |
|
64 | - $bar->advance(); |
|
65 | - } |
|
66 | - $bar->finish(); |
|
67 | - $this->info("\n{$count} accounts '{$group->name}' exported into file 'storage/app/{$filename}'"); |
|
68 | - } |
|
69 | - } |
|
59 | + Storage::put($filename, ''); |
|
60 | + $count = count($accounts); |
|
61 | + $bar = $this->output->createProgressBar($count); |
|
62 | + foreach ($accounts as $account) { |
|
63 | + Storage::prepend($filename, "{$account->netlogin}:{$account->netpass}"); |
|
64 | + $bar->advance(); |
|
65 | + } |
|
66 | + $bar->finish(); |
|
67 | + $this->info("\n{$count} accounts '{$group->name}' exported into file 'storage/app/{$filename}'"); |
|
68 | + } |
|
69 | + } |
|
70 | 70 | } |
@@ -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 | } |