@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | protected function getStub() |
44 | 44 | { |
45 | - return __DIR__.'/../../stubs/module-admin.stub'; |
|
45 | + return __DIR__ . '/../../stubs/module-admin.stub'; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -54,6 +54,6 @@ discard block |
||
54 | 54 | */ |
55 | 55 | protected function getDefaultNamespace($rootNamespace) |
56 | 56 | { |
57 | - return $rootNamespace.'\Admin\\Modules'; |
|
57 | + return $rootNamespace . '\Admin\\Modules'; |
|
58 | 58 | } |
59 | 59 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | protected function getStub() |
44 | 44 | { |
45 | - return __DIR__.'/../../stubs/widget-admin.stub'; |
|
45 | + return __DIR__ . '/../../stubs/widget-admin.stub'; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -54,6 +54,6 @@ discard block |
||
54 | 54 | */ |
55 | 55 | protected function getDefaultNamespace($rootNamespace) |
56 | 56 | { |
57 | - return $rootNamespace.'\Admin\\Widgets'; |
|
57 | + return $rootNamespace . '\Admin\\Widgets'; |
|
58 | 58 | } |
59 | 59 | } |
@@ -102,7 +102,7 @@ |
||
102 | 102 | $view = 'admin.dashboard'; |
103 | 103 | |
104 | 104 | if (!view()->exists($view)) { |
105 | - $view = 'flare::'.$view; |
|
105 | + $view = 'flare::' . $view; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | return view($view, ['widgetAdminManager' => (new WidgetAdminManager())]); |
@@ -170,8 +170,8 @@ |
||
170 | 170 | { |
171 | 171 | // Could swap this out for model -> getAttribute, then check if we have an attribute or a relation... getRelationValue() is helpful |
172 | 172 | if (method_exists($this->model, $key) && is_a(call_user_func_array([$this->model, $key], []), 'Illuminate\Database\Eloquent\Relations\Relation')) { |
173 | - foreach ($this->{$action.'Relations'} as $relationship => $method) { |
|
174 | - if (is_a(call_user_func_array([$this->model, $key], []), 'Illuminate\Database\Eloquent\Relations\\'.$relationship)) { |
|
173 | + foreach ($this->{$action . 'Relations'} as $relationship => $method) { |
|
174 | + if (is_a(call_user_func_array([$this->model, $key], []), 'Illuminate\Database\Eloquent\Relations\\' . $relationship)) { |
|
175 | 175 | $this->model->$key()->$method($value); |
176 | 176 | |
177 | 177 | return; |
@@ -29,11 +29,11 @@ discard block |
||
29 | 29 | // parameter represents the DataTables column identifier. In this case simple |
30 | 30 | // indexes |
31 | 31 | $columns = array( |
32 | - array( 'db' => 'id', 'dt' => 0 ), |
|
33 | - array( 'db' => 'firstname', 'dt' => 1 ), |
|
34 | - array( 'db' => 'surname', 'dt' => 2 ), |
|
35 | - array( 'db' => 'zip', 'dt' => 3 ), |
|
36 | - array( 'db' => 'country', 'dt' => 4 ) |
|
32 | + array('db' => 'id', 'dt' => 0), |
|
33 | + array('db' => 'firstname', 'dt' => 1), |
|
34 | + array('db' => 'surname', 'dt' => 2), |
|
35 | + array('db' => 'zip', 'dt' => 3), |
|
36 | + array('db' => 'country', 'dt' => 4) |
|
37 | 37 | ); |
38 | 38 | |
39 | 39 | // SQL server connection information |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | * server-side, there is no need to edit below this line. |
51 | 51 | */ |
52 | 52 | |
53 | -require( '../../../../examples/server_side/scripts/ssp.class.php' ); |
|
53 | +require('../../../../examples/server_side/scripts/ssp.class.php'); |
|
54 | 54 | |
55 | 55 | echo json_encode( |
56 | - SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns ) |
|
56 | + SSP::simple($_GET, $sql_details, $table, $primaryKey, $columns) |
|
57 | 57 | ); |
58 | 58 |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | public function config($key) |
54 | 54 | { |
55 | 55 | if (array_key_exists($key, $this->configurationKeys)) { |
56 | - return config('flare.'.$key, $this->configurationKeys[$key]); |
|
56 | + return config('flare.' . $key, $this->configurationKeys[$key]); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | return config($key); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | public function relativeAdminUrl($path = '') |
105 | 105 | { |
106 | - return rtrim(\Flare::config('admin_url').'/'.$path, '/'); |
|
106 | + return rtrim(\Flare::config('admin_url') . '/' . $path, '/'); |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | /** |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function docsUrl($path = '') |
118 | 118 | { |
119 | - return url('#'.$path); |
|
119 | + return url('#' . $path); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | /** |
@@ -171,10 +171,10 @@ discard block |
||
171 | 171 | if ($this->attributeTypeExists($field['type'])) { |
172 | 172 | $fieldType = $this->resolveAttributeClass($field['type']); |
173 | 173 | |
174 | - return call_user_func_array([new $fieldType($attribute, $field, $model, $modelManager), camel_case('render_'.$action)], []); |
|
174 | + return call_user_func_array([new $fieldType($attribute, $field, $model, $modelManager), camel_case('render_' . $action)], []); |
|
175 | 175 | } |
176 | 176 | |
177 | - return call_user_func_array([new BaseAttribute($attribute, $field, $model, $modelManager), camel_case('render_'.$action)], []); |
|
177 | + return call_user_func_array([new BaseAttribute($attribute, $field, $model, $modelManager), camel_case('render_' . $action)], []); |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | /** |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | */ |
187 | 187 | protected function resolveAttributeClass($type) |
188 | 188 | { |
189 | - $fullClassname = array_key_exists(title_case($type).'Attribute', $this->availableAttributes()) ? $this->availableAttributes()[title_case($type).'Attribute'] : false; |
|
189 | + $fullClassname = array_key_exists(title_case($type) . 'Attribute', $this->availableAttributes()) ? $this->availableAttributes()[title_case($type) . 'Attribute'] : false; |
|
190 | 190 | |
191 | 191 | if (!$fullClassname || !class_exists($fullClassname)) { |
192 | 192 | return false; |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | if (($methodBreaker = strpos($field, '.')) !== false) { |
150 | 150 | $method = substr($field, 0, $methodBreaker); |
151 | 151 | if (method_exists($this->model, $method)) { |
152 | - if (method_exists($this->model->$method(), $submethod = str_replace($method.'.', '', $field))) { |
|
152 | + if (method_exists($this->model->$method(), $submethod = str_replace($method . '.', '', $field))) { |
|
153 | 153 | $this->model->$method()->$submethod(); |
154 | 154 | |
155 | 155 | $columns[$field] = $fieldTitle; |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | } |
190 | 190 | |
191 | 191 | if ($this->hasGetAccessor($key)) { |
192 | - $method = 'get'.Str::studly($key).'Attribute'; |
|
192 | + $method = 'get' . Str::studly($key) . 'Attribute'; |
|
193 | 193 | |
194 | 194 | return $this->{$method}($model); |
195 | 195 | } |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | */ |
211 | 211 | public function hasGetAccessor($key) |
212 | 212 | { |
213 | - return method_exists($this, 'get'.Str::studly($key).'Attribute'); |
|
213 | + return method_exists($this, 'get' . Str::studly($key) . 'Attribute'); |
|
214 | 214 | } |
215 | 215 | |
216 | 216 | /** |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | if (($methodBreaker = strpos($key, '.')) !== false) { |
256 | 256 | $method = substr($key, 0, $methodBreaker); |
257 | 257 | if (method_exists($model, $method)) { |
258 | - if (method_exists($model->$method, $submethod = str_replace($method.'.', '', $key))) { |
|
258 | + if (method_exists($model->$method, $submethod = str_replace($method . '.', '', $key))) { |
|
259 | 259 | return $model->$method->$submethod(); |
260 | 260 | } |
261 | 261 | |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | public function setAttribute($key, $value) |
280 | 280 | { |
281 | 281 | if ($this->hasSetMutator($key)) { |
282 | - $method = 'set'.Str::studly($key).'Attribute'; |
|
282 | + $method = 'set' . Str::studly($key) . 'Attribute'; |
|
283 | 283 | |
284 | 284 | return $this->{$method}($value); |
285 | 285 | } |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | */ |
297 | 297 | public function hasSetMutator($key) |
298 | 298 | { |
299 | - return method_exists($this, 'set'.Str::studly($key).'Attribute'); |
|
299 | + return method_exists($this, 'set' . Str::studly($key) . 'Attribute'); |
|
300 | 300 | } |
301 | 301 | |
302 | 302 | /** |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | */ |
309 | 309 | public function hasGetMutator($key) |
310 | 310 | { |
311 | - return method_exists($this, 'get'.Str::studly($key).'Attribute'); |
|
311 | + return method_exists($this, 'get' . Str::studly($key) . 'Attribute'); |
|
312 | 312 | } |
313 | 313 | |
314 | 314 | /** |
@@ -14,29 +14,29 @@ discard block |
||
14 | 14 | { |
15 | 15 | // Assets |
16 | 16 | $this->publishes([ |
17 | - __DIR__.'/../public/flare' => public_path('vendor/flare'), |
|
18 | - __DIR__.'/../public/AdminLTE/bootstrap' => public_path('vendor/flare/bootstrap'), |
|
19 | - __DIR__.'/../public/AdminLTE/dist' => public_path('vendor/flare'), |
|
20 | - __DIR__.'/../public/AdminLTE/plugins' => public_path('vendor/flare/plugins'), |
|
17 | + __DIR__ . '/../public/flare' => public_path('vendor/flare'), |
|
18 | + __DIR__ . '/../public/AdminLTE/bootstrap' => public_path('vendor/flare/bootstrap'), |
|
19 | + __DIR__ . '/../public/AdminLTE/dist' => public_path('vendor/flare'), |
|
20 | + __DIR__ . '/../public/AdminLTE/plugins' => public_path('vendor/flare/plugins'), |
|
21 | 21 | ], 'public'); |
22 | 22 | |
23 | 23 | // Config |
24 | 24 | $this->publishes([ |
25 | - __DIR__.'/../config/flare.php' => config_path('flare.php'), |
|
25 | + __DIR__ . '/../config/flare.php' => config_path('flare.php'), |
|
26 | 26 | ]); |
27 | 27 | |
28 | 28 | // Database Migrations |
29 | 29 | $this->publishes([ |
30 | - __DIR__.'/Database/Migrations' => base_path('database/migrations'), |
|
30 | + __DIR__ . '/Database/Migrations' => base_path('database/migrations'), |
|
31 | 31 | ]); |
32 | 32 | |
33 | 33 | // Binds the Permissions interface to the defined Permissions class |
34 | 34 | $this->app->bind(\LaravelFlare\Flare\Contracts\Permissions\Permissionable::class, \Flare::config('permissions')); |
35 | 35 | |
36 | 36 | // Views |
37 | - $this->loadViewsFrom(__DIR__.'/../resources/views', 'flare'); |
|
37 | + $this->loadViewsFrom(__DIR__ . '/../resources/views', 'flare'); |
|
38 | 38 | $this->publishes([ |
39 | - __DIR__.'/../resources/views' => base_path('resources/views/vendor/flare'), |
|
39 | + __DIR__ . '/../resources/views' => base_path('resources/views/vendor/flare'), |
|
40 | 40 | ]); |
41 | 41 | |
42 | 42 | $this->registerBladeOperators(); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | { |
50 | 50 | // Merge Config |
51 | 51 | $this->mergeConfigFrom( |
52 | - __DIR__.'/../config/flare.php', 'flare' |
|
52 | + __DIR__ . '/../config/flare.php', 'flare' |
|
53 | 53 | ); |
54 | 54 | |
55 | 55 | $this->registerServiceProviders(); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | $router->group(['prefix' => \Flare::config('admin_url'), 'middleware' => ['flarebase']], function ($router) { |
62 | 62 | |
63 | 63 | // Needs replacing with implicit routes, as controller is deprecated as of 5.2 and will be removed in 5.3 |
64 | - $router->controller('/', $this->namespace.'\AdminController'); |
|
64 | + $router->controller('/', $this->namespace . '\AdminController'); |
|
65 | 65 | |
66 | 66 | }); |
67 | 67 | } |