@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | protected function getStub() |
| 44 | 44 | { |
| 45 | - return __DIR__.'/../../stubs/model-admin-controller.stub'; |
|
| 45 | + return __DIR__ . '/../../stubs/model-admin-controller.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\\Http\\Controllers'; |
|
| 57 | + return $rootNamespace . '\Admin\\Http\\Controllers'; |
|
| 58 | 58 | } |
| 59 | 59 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | protected function getStub() |
| 44 | 44 | { |
| 45 | - return __DIR__.'/../../stubs/model-admin.stub'; |
|
| 45 | + return __DIR__ . '/../../stubs/model-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\\Models'; |
|
| 57 | + return $rootNamespace . '\Admin\\Models'; |
|
| 58 | 58 | } |
| 59 | 59 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | protected function getStub() |
| 44 | 44 | { |
| 45 | - return __DIR__.'/../../stubs/module-admin-controller.stub'; |
|
| 45 | + return __DIR__ . '/../../stubs/module-admin-controller.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\\Http\\Controllers'; |
|
| 57 | + return $rootNamespace . '\Admin\\Http\\Controllers'; |
|
| 58 | 58 | } |
| 59 | 59 | } |
@@ -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 | } |
@@ -15,15 +15,15 @@ discard block |
||
| 15 | 15 | { |
| 16 | 16 | // Assets |
| 17 | 17 | $this->publishes([ |
| 18 | - __DIR__.'/../public/flare' => public_path('vendor/flare'), |
|
| 19 | - __DIR__.'/../public/AdminLTE/bootstrap' => public_path('vendor/flare/bootstrap'), |
|
| 20 | - __DIR__.'/../public/AdminLTE/dist' => public_path('vendor/flare'), |
|
| 21 | - __DIR__.'/../public/AdminLTE/plugins' => public_path('vendor/flare/plugins'), |
|
| 18 | + __DIR__ . '/../public/flare' => public_path('vendor/flare'), |
|
| 19 | + __DIR__ . '/../public/AdminLTE/bootstrap' => public_path('vendor/flare/bootstrap'), |
|
| 20 | + __DIR__ . '/../public/AdminLTE/dist' => public_path('vendor/flare'), |
|
| 21 | + __DIR__ . '/../public/AdminLTE/plugins' => public_path('vendor/flare/plugins'), |
|
| 22 | 22 | ], 'public'); |
| 23 | 23 | |
| 24 | 24 | // Config |
| 25 | 25 | $this->publishes([ |
| 26 | - __DIR__.'/../config/flare.php' => config_path('flare.php'), |
|
| 26 | + __DIR__ . '/../config/flare.php' => config_path('flare.php'), |
|
| 27 | 27 | ]); |
| 28 | 28 | |
| 29 | 29 | // Middleware |
@@ -36,13 +36,13 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | // Routes |
| 38 | 38 | if (!$this->app->routesAreCached()) { |
| 39 | - require __DIR__.'/Http/routes.php'; |
|
| 39 | + require __DIR__ . '/Http/routes.php'; |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | // Views |
| 43 | - $this->loadViewsFrom(__DIR__.'/../resources/views', 'flare'); |
|
| 43 | + $this->loadViewsFrom(__DIR__ . '/../resources/views', 'flare'); |
|
| 44 | 44 | $this->publishes([ |
| 45 | - __DIR__.'/../resources/views' => base_path('resources/views/vendor/flare'), |
|
| 45 | + __DIR__ . '/../resources/views' => base_path('resources/views/vendor/flare'), |
|
| 46 | 46 | ]); |
| 47 | 47 | |
| 48 | 48 | $this->registerBladeOperators(); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | { |
| 56 | 56 | // Merge Config |
| 57 | 57 | $this->mergeConfigFrom( |
| 58 | - __DIR__.'/../config/flare.php', 'flare' |
|
| 58 | + __DIR__ . '/../config/flare.php', 'flare' |
|
| 59 | 59 | ); |
| 60 | 60 | |
| 61 | 61 | $this->registerServiceProviders(); |
@@ -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,19 +29,19 @@ 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 |
| 40 | 40 | $sql_details = array( |
| 41 | - 'user' => '', |
|
| 42 | - 'pass' => '', |
|
| 43 | - 'db' => '', |
|
| 44 | - 'host' => '' |
|
| 41 | + 'user' => '', |
|
| 42 | + 'pass' => '', |
|
| 43 | + 'db' => '', |
|
| 44 | + 'host' => '' |
|
| 45 | 45 | ); |
| 46 | 46 | |
| 47 | 47 | |
@@ -53,6 +53,6 @@ discard block |
||
| 53 | 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 | |
@@ -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; |