@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | { |
| 16 | 16 | $this->table = 'cms_moduls'; |
| 17 | 17 | $this->primaryKey = 'id'; |
| 18 | - $this->title_field = 'name' ; |
|
| 18 | + $this->title_field = 'name'; |
|
| 19 | 19 | $this->limit = 100; |
| 20 | 20 | $this->button_add = false; |
| 21 | 21 | $this->buttonExport = false; |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | $this->orderby = ['is_protected' => 'asc', 'name' => 'asc']; |
| 28 | 28 | |
| 29 | 29 | $this->col = []; |
| 30 | - $this->col[] = ['label' => 'name', 'name' => 'name' ]; |
|
| 30 | + $this->col[] = ['label' => 'name', 'name' => 'name']; |
|
| 31 | 31 | $this->col[] = ['label' => "Table", 'name' => "table_name"]; |
| 32 | 32 | $this->col[] = ['label' => "Path", 'name' => "path"]; |
| 33 | 33 | $this->col[] = ['label' => "Controller", 'name' => "controller"]; |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | public static function findPK($table) |
| 18 | 18 | { |
| 19 | - if (! $table) { |
|
| 19 | + if (!$table) { |
|
| 20 | 20 | return 'id'; |
| 21 | 21 | } |
| 22 | 22 | |
@@ -25,13 +25,13 @@ discard block |
||
| 25 | 25 | } |
| 26 | 26 | $table = CRUDBooster::parseSqlTable($table); |
| 27 | 27 | |
| 28 | - if (! $table['table']) { |
|
| 28 | + if (!$table['table']) { |
|
| 29 | 29 | throw new \Exception("parseSqlTable can't determine the table"); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | $primaryKey = self::findPKname($table); |
| 33 | 33 | |
| 34 | - if (! $primaryKey) { |
|
| 34 | + if (!$primaryKey) { |
|
| 35 | 35 | return 'id'; |
| 36 | 36 | } |
| 37 | 37 | CbCache::put('table_'.$table, 'primaryKey', $primaryKey); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | $table = self::getTableForeignKey($fieldName); |
| 99 | - if (! $table) { |
|
| 99 | + if (!$table) { |
|
| 100 | 100 | return false; |
| 101 | 101 | } |
| 102 | 102 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | |
| 179 | - $tables = array_map(function ($table) { |
|
| 179 | + $tables = array_map(function($table) { |
|
| 180 | 180 | return $table->TABLE_NAME; |
| 181 | 181 | }, $tables); |
| 182 | 182 | |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | public static function first($table, $id) |
| 110 | 110 | { |
| 111 | 111 | $table = self::parseSqlTable($table)['table']; |
| 112 | - if (! is_array($id)) { |
|
| 112 | + if (!is_array($id)) { |
|
| 113 | 113 | $pk = DbInspector::findPK($table); |
| 114 | 114 | |
| 115 | 115 | return DB::table($table)->where($pk, $id)->first(); |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | $controllerName = basename($controllerName); |
| 136 | 136 | $route_url = route($controllerName.'GetIndex'); |
| 137 | 137 | |
| 138 | - if (! $path) { |
|
| 138 | + if (!$path) { |
|
| 139 | 139 | return trim($route_url, '/'); |
| 140 | 140 | } |
| 141 | 141 | |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | { |
| 166 | 166 | $tables = DbInspector::listTables(); |
| 167 | 167 | |
| 168 | - $filter = function ($tableName) { |
|
| 168 | + $filter = function($tableName) { |
|
| 169 | 169 | |
| 170 | 170 | if ($tableName == config('database.migrations')) { |
| 171 | 171 | return false; |