@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | |
94 | 94 | $modelName = ucfirst(Str::singular($object->name)); |
95 | 95 | |
96 | - $model = $namespace . '\\' . $modelName; |
|
96 | + $model = $namespace.'\\'.$modelName; |
|
97 | 97 | $object->model = $model; |
98 | 98 | } |
99 | 99 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $table = Table::getTable($tableName); |
106 | 106 | |
107 | 107 | $modelName = ucfirst(Str::singular($table['name'])); |
108 | - $model = $namespace . '\\' . $modelName; |
|
108 | + $model = $namespace.'\\'.$modelName; |
|
109 | 109 | |
110 | 110 | $object = new \stdClass; |
111 | 111 | $object->name = $table['name']; |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $columns = $request->fields; |
176 | 176 | $permission = $request->isCrudExists ? 'update' : 'create'; |
177 | 177 | |
178 | - if (($response = DBM::authorize('crud.' . $permission)) !== true) { |
|
178 | + if (($response = DBM::authorize('crud.'.$permission)) !== true) { |
|
179 | 179 | return $response; |
180 | 180 | } |
181 | 181 | |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | $prefix = (Driver::isMongoDB()) ? "_" : ""; |
324 | 324 | |
325 | 325 | foreach ($fields as $fld) { |
326 | - if ($fld->id == $field->{$prefix . "id"}) { |
|
326 | + if ($fld->id == $field->{$prefix."id"}) { |
|
327 | 327 | |
328 | 328 | $relationship = $fld->settings; |
329 | 329 | $localTable = $relationship['localTable']; |
@@ -357,17 +357,17 @@ discard block |
||
357 | 357 | |
358 | 358 | if (!class_exists($relationship['localModel'])) { |
359 | 359 | |
360 | - $error = $relationship['localModel'] . " Model not found. Please create the " . $relationship['localModel'] . " model first"; |
|
360 | + $error = $relationship['localModel']." Model not found. Please create the ".$relationship['localModel']." model first"; |
|
361 | 361 | return $this->generateError([$error]); |
362 | 362 | } |
363 | 363 | |
364 | 364 | if (!class_exists($relationship['foreignModel'])) { |
365 | 365 | |
366 | - $error = $relationship['foreignModel'] . " Model not found. Please create the " . $relationship['foreignModel'] . " model first"; |
|
366 | + $error = $relationship['foreignModel']." Model not found. Please create the ".$relationship['foreignModel']." model first"; |
|
367 | 367 | return $this->generateError([$error]); |
368 | 368 | } |
369 | 369 | |
370 | - $fieldName = strtolower(Str::singular($relationship['localTable']) . '_' . $relationship['type'] . '_' . Str::singular($relationship['foreignTable']) . '_relationship'); |
|
370 | + $fieldName = strtolower(Str::singular($relationship['localTable']).'_'.$relationship['type'].'_'.Str::singular($relationship['foreignTable']).'_relationship'); |
|
371 | 371 | $settings = [ |
372 | 372 | 'relationType' => $relationship['type'], |
373 | 373 | 'localModel' => $relationship['localModel'], |