@@ -211,7 +211,7 @@ |
||
211 | 211 | $jsonData = json_decode($content, true); |
212 | 212 | |
213 | 213 | if (json_last_error() !== JSON_ERROR_NONE) { |
214 | - throw new \Exception('Invalid JSON file: ' . json_last_error_msg()); |
|
214 | + throw new \Exception('Invalid JSON file: '.json_last_error_msg()); |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | $data = $jsonData['data'] ?? $jsonData; |
@@ -147,7 +147,9 @@ |
||
147 | 147 | |
148 | 148 | foreach ($lines as $index => $line) { |
149 | 149 | $line = trim($line); |
150 | - if (empty($line)) continue; |
|
150 | + if (empty($line)) { |
|
151 | + continue; |
|
152 | + } |
|
151 | 153 | |
152 | 154 | $row = str_getcsv($line); |
153 | 155 |
@@ -147,9 +147,9 @@ discard block |
||
147 | 147 | |
148 | 148 | // Add headers |
149 | 149 | if (!empty($this->columns)) { |
150 | - $csv .= implode(',', $this->columns) . "\n"; |
|
150 | + $csv .= implode(',', $this->columns)."\n"; |
|
151 | 151 | } elseif (!empty($this->data)) { |
152 | - $csv .= implode(',', array_keys($this->data[0])) . "\n"; |
|
152 | + $csv .= implode(',', array_keys($this->data[0]))."\n"; |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | // Add data rows |
@@ -157,9 +157,9 @@ discard block |
||
157 | 157 | $csvRow = []; |
158 | 158 | foreach ($row as $value) { |
159 | 159 | // Escape CSV values |
160 | - $csvRow[] = '"' . str_replace('"', '""', $value) . '"'; |
|
160 | + $csvRow[] = '"'.str_replace('"', '""', $value).'"'; |
|
161 | 161 | } |
162 | - $csv .= implode(',', $csvRow) . "\n"; |
|
162 | + $csv .= implode(',', $csvRow)."\n"; |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | Storage::put($filename, $csv); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | @if($errors->hasBag('exception') && config('app.debug') == true) |
2 | - <?php $error = $errors->getBag('exception');?> |
|
2 | + <?php $error = $errors->getBag('exception'); ?> |
|
3 | 3 | <div class="alert alert-warning alert-dismissable"> |
4 | 4 | <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> |
5 | 5 | <h4> |
@@ -2,6 +2,6 @@ |
||
2 | 2 | |
3 | 3 | use Illuminate\Support\Facades\Route; |
4 | 4 | |
5 | -Route::get('/', function () { |
|
5 | +Route::get('/', function() { |
|
6 | 6 | return view('welcome'); |
7 | 7 | }); |
@@ -3,6 +3,6 @@ |
||
3 | 3 | use Illuminate\Foundation\Inspiring; |
4 | 4 | use Illuminate\Support\Facades\Artisan; |
5 | 5 | |
6 | -Artisan::command('inspire', function () { |
|
6 | +Artisan::command('inspire', function() { |
|
7 | 7 | $this->comment(Inspiring::quote()); |
8 | 8 | })->purpose('Display an inspiring quote'); |
@@ -11,13 +11,13 @@ |
||
11 | 11 | */ |
12 | 12 | public function up(): void |
13 | 13 | { |
14 | - Schema::create('cache', function (Blueprint $table) { |
|
14 | + Schema::create('cache', function(Blueprint $table) { |
|
15 | 15 | $table->string('key')->primary(); |
16 | 16 | $table->mediumText('value'); |
17 | 17 | $table->integer('expiration'); |
18 | 18 | }); |
19 | 19 | |
20 | - Schema::create('cache_locks', function (Blueprint $table) { |
|
20 | + Schema::create('cache_locks', function(Blueprint $table) { |
|
21 | 21 | $table->string('key')->primary(); |
22 | 22 | $table->string('owner'); |
23 | 23 | $table->integer('expiration'); |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | public function up(): void |
13 | 13 | { |
14 | - Schema::create('users', function (Blueprint $table) { |
|
14 | + Schema::create('users', function(Blueprint $table) { |
|
15 | 15 | $table->id(); |
16 | 16 | $table->string('name'); |
17 | 17 | $table->string('email')->unique(); |
@@ -21,13 +21,13 @@ discard block |
||
21 | 21 | $table->timestamps(); |
22 | 22 | }); |
23 | 23 | |
24 | - Schema::create('password_reset_tokens', function (Blueprint $table) { |
|
24 | + Schema::create('password_reset_tokens', function(Blueprint $table) { |
|
25 | 25 | $table->string('email')->primary(); |
26 | 26 | $table->string('token'); |
27 | 27 | $table->timestamp('created_at')->nullable(); |
28 | 28 | }); |
29 | 29 | |
30 | - Schema::create('sessions', function (Blueprint $table) { |
|
30 | + Schema::create('sessions', function(Blueprint $table) { |
|
31 | 31 | $table->string('id')->primary(); |
32 | 32 | $table->foreignId('user_id')->nullable()->index(); |
33 | 33 | $table->string('ip_address', 45)->nullable(); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | */ |
22 | 22 | public function up() |
23 | 23 | { |
24 | - Schema::create(config('admin.database.users_table'), function (Blueprint $table) { |
|
24 | + Schema::create(config('admin.database.users_table'), function(Blueprint $table) { |
|
25 | 25 | $table->id(); |
26 | 26 | $table->string('username', 190)->unique(); |
27 | 27 | $table->string('password', 60); |
@@ -31,14 +31,14 @@ discard block |
||
31 | 31 | $table->timestamps(); |
32 | 32 | }); |
33 | 33 | |
34 | - Schema::create(config('admin.database.roles_table'), function (Blueprint $table) { |
|
34 | + Schema::create(config('admin.database.roles_table'), function(Blueprint $table) { |
|
35 | 35 | $table->id(); |
36 | 36 | $table->string('name', 50)->unique(); |
37 | 37 | $table->string('slug', 50)->unique(); |
38 | 38 | $table->timestamps(); |
39 | 39 | }); |
40 | 40 | |
41 | - Schema::create(config('admin.database.permissions_table'), function (Blueprint $table) { |
|
41 | + Schema::create(config('admin.database.permissions_table'), function(Blueprint $table) { |
|
42 | 42 | $table->id(); |
43 | 43 | $table->string('name', 50)->unique(); |
44 | 44 | $table->string('slug', 50)->unique(); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $table->timestamps(); |
48 | 48 | }); |
49 | 49 | |
50 | - Schema::create(config('admin.database.menu_table'), function (Blueprint $table) { |
|
50 | + Schema::create(config('admin.database.menu_table'), function(Blueprint $table) { |
|
51 | 51 | $table->id(); |
52 | 52 | $table->integer('parent_id')->default(0); |
53 | 53 | $table->integer('order')->default(0); |
@@ -59,35 +59,35 @@ discard block |
||
59 | 59 | $table->timestamps(); |
60 | 60 | }); |
61 | 61 | |
62 | - Schema::create(config('admin.database.role_users_table'), function (Blueprint $table) { |
|
62 | + Schema::create(config('admin.database.role_users_table'), function(Blueprint $table) { |
|
63 | 63 | $table->foreignId('role_id')->constrained(config('admin.database.roles_table'))->onDelete('cascade'); |
64 | 64 | $table->foreignId('user_id')->constrained(config('admin.database.users_table'))->onDelete('cascade'); |
65 | 65 | $table->index(['role_id', 'user_id']); |
66 | 66 | $table->timestamps(); |
67 | 67 | }); |
68 | 68 | |
69 | - Schema::create(config('admin.database.role_permissions_table'), function (Blueprint $table) { |
|
69 | + Schema::create(config('admin.database.role_permissions_table'), function(Blueprint $table) { |
|
70 | 70 | $table->foreignId('role_id')->constrained(config('admin.database.roles_table'))->onDelete('cascade'); |
71 | 71 | $table->foreignId('permission_id')->constrained(config('admin.database.permissions_table'))->onDelete('cascade'); |
72 | 72 | $table->index(['role_id', 'permission_id']); |
73 | 73 | $table->timestamps(); |
74 | 74 | }); |
75 | 75 | |
76 | - Schema::create(config('admin.database.user_permissions_table'), function (Blueprint $table) { |
|
76 | + Schema::create(config('admin.database.user_permissions_table'), function(Blueprint $table) { |
|
77 | 77 | $table->foreignId('user_id')->constrained(config('admin.database.users_table'))->onDelete('cascade'); |
78 | 78 | $table->foreignId('permission_id')->constrained(config('admin.database.permissions_table'))->onDelete('cascade'); |
79 | 79 | $table->index(['user_id', 'permission_id']); |
80 | 80 | $table->timestamps(); |
81 | 81 | }); |
82 | 82 | |
83 | - Schema::create(config('admin.database.role_menu_table'), function (Blueprint $table) { |
|
83 | + Schema::create(config('admin.database.role_menu_table'), function(Blueprint $table) { |
|
84 | 84 | $table->foreignId('role_id')->constrained(config('admin.database.roles_table'))->onDelete('cascade'); |
85 | 85 | $table->foreignId('menu_id')->constrained(config('admin.database.menu_table'))->onDelete('cascade'); |
86 | 86 | $table->index(['role_id', 'menu_id']); |
87 | 87 | $table->timestamps(); |
88 | 88 | }); |
89 | 89 | |
90 | - Schema::create(config('admin.database.operation_log_table'), function (Blueprint $table) { |
|
90 | + Schema::create(config('admin.database.operation_log_table'), function(Blueprint $table) { |
|
91 | 91 | $table->id(); |
92 | 92 | $table->foreignId('user_id')->constrained(config('admin.database.users_table'))->onDelete('cascade'); |
93 | 93 | $table->string('path'); |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | public function up(): void |
13 | 13 | { |
14 | - Schema::create('jobs', function (Blueprint $table) { |
|
14 | + Schema::create('jobs', function(Blueprint $table) { |
|
15 | 15 | $table->id(); |
16 | 16 | $table->string('queue')->index(); |
17 | 17 | $table->longText('payload'); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | $table->unsignedInteger('created_at'); |
22 | 22 | }); |
23 | 23 | |
24 | - Schema::create('job_batches', function (Blueprint $table) { |
|
24 | + Schema::create('job_batches', function(Blueprint $table) { |
|
25 | 25 | $table->string('id')->primary(); |
26 | 26 | $table->string('name'); |
27 | 27 | $table->integer('total_jobs'); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $table->integer('finished_at')->nullable(); |
35 | 35 | }); |
36 | 36 | |
37 | - Schema::create('failed_jobs', function (Blueprint $table) { |
|
37 | + Schema::create('failed_jobs', function(Blueprint $table) { |
|
38 | 38 | $table->id(); |
39 | 39 | $table->string('uuid')->unique(); |
40 | 40 | $table->text('connection'); |