@@ -12,7 +12,7 @@ |
||
12 | 12 | $this->value = $this->value->toArray(); |
13 | 13 | } |
14 | 14 | |
15 | - return collect((array) $this->value)->map(function ($name) use ($style) { |
|
15 | + return collect((array) $this->value)->map(function($name) use ($style) { |
|
16 | 16 | return "<span class='label label-{$style}'>$name</span>"; |
17 | 17 | })->implode(' '); |
18 | 18 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | $this->value = $this->value->toArray(); |
13 | 13 | } |
14 | 14 | |
15 | - return collect((array) $this->value)->map(function ($name) use ($style) { |
|
15 | + return collect((array) $this->value)->map(function($name) use ($style) { |
|
16 | 16 | return "<span class='badge bg-{$style}'>$name</span>"; |
17 | 17 | })->implode(' '); |
18 | 18 | } |
@@ -155,7 +155,7 @@ |
||
155 | 155 | 'data-value' => "{$this->value}", |
156 | 156 | ]; |
157 | 157 | |
158 | - $attributes = collect($attributes)->map(function ($attribute, $name) { |
|
158 | + $attributes = collect($attributes)->map(function($attribute, $name) { |
|
159 | 159 | return "$name='$attribute'"; |
160 | 160 | })->implode(' '); |
161 | 161 |
@@ -6,7 +6,7 @@ |
||
6 | 6 | { |
7 | 7 | public function display($style) |
8 | 8 | { |
9 | - $style = collect((array) $style)->map(function ($style) { |
|
9 | + $style = collect((array) $style)->map(function($style) { |
|
10 | 10 | return 'btn-'.$style; |
11 | 11 | })->implode(' '); |
12 | 12 |
@@ -6,7 +6,7 @@ |
||
6 | 6 | { |
7 | 7 | public function display($style = 'primary', $size = 'sm', $max = 100) |
8 | 8 | { |
9 | - $style = collect((array) $style)->map(function ($style) { |
|
9 | + $style = collect((array) $style)->map(function($style) { |
|
10 | 10 | return 'progress-bar-'.$style; |
11 | 11 | })->implode(' '); |
12 | 12 |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | */ |
162 | 162 | protected function prepareValue($key, $record) |
163 | 163 | { |
164 | - $field = $this->fields->first(function (Field $field) use ($key) { |
|
164 | + $field = $this->fields->first(function(Field $field) use ($key) { |
|
165 | 165 | return in_array($key, (array) $field->column()); |
166 | 166 | }); |
167 | 167 | |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | if (array_key_exists($key, $this->original)) { |
185 | 185 | $values = $this->original[$key]; |
186 | 186 | |
187 | - $this->fields->each(function (Field $field) use ($values) { |
|
187 | + $this->fields->each(function(Field $field) use ($values) { |
|
188 | 188 | $field->setOriginal($values); |
189 | 189 | }); |
190 | 190 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | */ |
200 | 200 | public function fill(array $data) |
201 | 201 | { |
202 | - $this->fields->each(function (Field $field) use ($data) { |
|
202 | + $this->fields->each(function(Field $field) use ($data) { |
|
203 | 203 | $field->fill($data); |
204 | 204 | }); |
205 | 205 |
@@ -82,7 +82,7 @@ |
||
82 | 82 | public function getTabs() |
83 | 83 | { |
84 | 84 | // If there is no active tab, then active the first. |
85 | - if ($this->tabs->filter(function ($tab) { |
|
85 | + if ($this->tabs->filter(function($tab) { |
|
86 | 86 | return $tab['active']; |
87 | 87 | })->isEmpty()) { |
88 | 88 | $first = $this->tabs->first(); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | { |
15 | 15 | $connection = config('admin.database.connection') ?: config('database.default'); |
16 | 16 | |
17 | - Schema::connection($connection)->create(config('admin.database.users_table'), function (Blueprint $table) { |
|
17 | + Schema::connection($connection)->create(config('admin.database.users_table'), function(Blueprint $table) { |
|
18 | 18 | $table->increments('id'); |
19 | 19 | $table->string('username', 190)->unique(); |
20 | 20 | $table->string('password', 60); |
@@ -23,21 +23,21 @@ discard block |
||
23 | 23 | $table->timestamps(); |
24 | 24 | }); |
25 | 25 | |
26 | - Schema::connection($connection)->create(config('admin.database.roles_table'), function (Blueprint $table) { |
|
26 | + Schema::connection($connection)->create(config('admin.database.roles_table'), function(Blueprint $table) { |
|
27 | 27 | $table->increments('id'); |
28 | 28 | $table->string('name', 50)->unique(); |
29 | 29 | $table->string('slug', 50); |
30 | 30 | $table->timestamps(); |
31 | 31 | }); |
32 | 32 | |
33 | - Schema::connection($connection)->create(config('admin.database.permissions_table'), function (Blueprint $table) { |
|
33 | + Schema::connection($connection)->create(config('admin.database.permissions_table'), function(Blueprint $table) { |
|
34 | 34 | $table->increments('id'); |
35 | 35 | $table->string('name', 50)->unique(); |
36 | 36 | $table->string('slug', 50); |
37 | 37 | $table->timestamps(); |
38 | 38 | }); |
39 | 39 | |
40 | - Schema::connection($connection)->create(config('admin.database.menu_table'), function (Blueprint $table) { |
|
40 | + Schema::connection($connection)->create(config('admin.database.menu_table'), function(Blueprint $table) { |
|
41 | 41 | $table->increments('id'); |
42 | 42 | $table->integer('parent_id')->default(0); |
43 | 43 | $table->integer('order')->default(0); |
@@ -48,35 +48,35 @@ discard block |
||
48 | 48 | $table->timestamps(); |
49 | 49 | }); |
50 | 50 | |
51 | - Schema::connection($connection)->create(config('admin.database.role_users_table'), function (Blueprint $table) { |
|
51 | + Schema::connection($connection)->create(config('admin.database.role_users_table'), function(Blueprint $table) { |
|
52 | 52 | $table->integer('role_id'); |
53 | 53 | $table->integer('user_id'); |
54 | 54 | $table->index(['role_id', 'user_id']); |
55 | 55 | $table->timestamps(); |
56 | 56 | }); |
57 | 57 | |
58 | - Schema::connection($connection)->create(config('admin.database.role_permissions_table'), function (Blueprint $table) { |
|
58 | + Schema::connection($connection)->create(config('admin.database.role_permissions_table'), function(Blueprint $table) { |
|
59 | 59 | $table->integer('role_id'); |
60 | 60 | $table->integer('permission_id'); |
61 | 61 | $table->index(['role_id', 'permission_id']); |
62 | 62 | $table->timestamps(); |
63 | 63 | }); |
64 | 64 | |
65 | - Schema::connection($connection)->create(config('admin.database.user_permissions_table'), function (Blueprint $table) { |
|
65 | + Schema::connection($connection)->create(config('admin.database.user_permissions_table'), function(Blueprint $table) { |
|
66 | 66 | $table->integer('user_id'); |
67 | 67 | $table->integer('permission_id'); |
68 | 68 | $table->index(['user_id', 'permission_id']); |
69 | 69 | $table->timestamps(); |
70 | 70 | }); |
71 | 71 | |
72 | - Schema::connection($connection)->create(config('admin.database.role_menu_table'), function (Blueprint $table) { |
|
72 | + Schema::connection($connection)->create(config('admin.database.role_menu_table'), function(Blueprint $table) { |
|
73 | 73 | $table->integer('role_id'); |
74 | 74 | $table->integer('menu_id'); |
75 | 75 | $table->index(['role_id', 'menu_id']); |
76 | 76 | $table->timestamps(); |
77 | 77 | }); |
78 | 78 | |
79 | - Schema::connection($connection)->create(config('admin.database.operation_log_table'), function (Blueprint $table) { |
|
79 | + Schema::connection($connection)->create(config('admin.database.operation_log_table'), function(Blueprint $table) { |
|
80 | 80 | $table->increments('id'); |
81 | 81 | $table->integer('user_id'); |
82 | 82 | $table->string('path'); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | @if($errors->hasBag('exception')) |
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> |