@@ -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']; |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | if ($table['makeModel'] == true && !class_exists($table['model'])) { |
287 | 287 | \DBM::makeModel($table['model'], $table['name']); |
288 | 288 | } else if ($table['makeModel'] == false && !class_exists($table['model'])) { |
289 | - return $this->generateError(["Create model '" . $table['model'] . "' first or checked create model option"]); |
|
289 | + return $this->generateError(["Create model '".$table['model']."' first or checked create model option"]); |
|
290 | 290 | } |
291 | 291 | |
292 | 292 | if (!class_exists($table['controller'])) { |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | $prefix = (Driver::isMongoDB()) ? "_" : ""; |
363 | 363 | |
364 | 364 | foreach ($fields as $fld) { |
365 | - if ($fld->id == $field->{$prefix . "id"}) { |
|
365 | + if ($fld->id == $field->{$prefix."id"}) { |
|
366 | 366 | |
367 | 367 | $relationship = $fld->settings; |
368 | 368 | $localTable = $relationship['localTable']; |
@@ -396,17 +396,17 @@ discard block |
||
396 | 396 | |
397 | 397 | if (!class_exists($relationship['localModel'])) { |
398 | 398 | |
399 | - $error = $relationship['localModel'] . " Model not found. Please create the " . $relationship['localModel'] . " model first"; |
|
399 | + $error = $relationship['localModel']." Model not found. Please create the ".$relationship['localModel']." model first"; |
|
400 | 400 | return $this->generateError([$error]); |
401 | 401 | } |
402 | 402 | |
403 | 403 | if (!class_exists($relationship['foreignModel'])) { |
404 | 404 | |
405 | - $error = $relationship['foreignModel'] . " Model not found. Please create the " . $relationship['foreignModel'] . " model first"; |
|
405 | + $error = $relationship['foreignModel']." Model not found. Please create the ".$relationship['foreignModel']." model first"; |
|
406 | 406 | return $this->generateError([$error]); |
407 | 407 | } |
408 | 408 | |
409 | - $fieldName = strtolower(Str::singular($relationship['localTable']) . '_' . $relationship['type'] . '_' . Str::singular($relationship['foreignTable']) . '_relationship'); |
|
409 | + $fieldName = strtolower(Str::singular($relationship['localTable']).'_'.$relationship['type'].'_'.Str::singular($relationship['foreignTable']).'_relationship'); |
|
410 | 410 | $settings = [ |
411 | 411 | 'relationType' => $relationship['type'], |
412 | 412 | 'localModel' => $relationship['localModel'], |