@@ -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 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $table = Table::getTable($tableName); |
108 | 108 | |
109 | 109 | $modelName = ucfirst(Str::singular($table['name'])); |
110 | - $model = $namespace . '\\' . $modelName; |
|
110 | + $model = $namespace.'\\'.$modelName; |
|
111 | 111 | |
112 | 112 | $object = new \stdClass; |
113 | 113 | $object->name = $table['name']; |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | } else if ($table['makeModel'] == false && !class_exists($table['model'])) { |
206 | 206 | return response()->json([ |
207 | 207 | 'success' => false, |
208 | - 'errors' => ["Create model '" . $table['model'] . "' first or checked create model option"], |
|
208 | + 'errors' => ["Create model '".$table['model']."' first or checked create model option"], |
|
209 | 209 | ], 400); |
210 | 210 | } |
211 | 211 | |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | if ($table['makeModel'] == true) { |
272 | 272 | \DBM::makeModel($table['model'], $table['name']); |
273 | 273 | } else if ($table['makeModel'] == false && !class_exists($table['model'])) { |
274 | - return $this->generateError(["Create mode '" . $table['model'] . "' first."]); |
|
274 | + return $this->generateError(["Create mode '".$table['model']."' first."]); |
|
275 | 275 | } |
276 | 276 | |
277 | 277 | if (!class_exists($table['controller'])) { |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | $prefix = (Driver::isMongoDB()) ? "_" : ""; |
370 | 370 | |
371 | 371 | foreach ($fields as $fld) { |
372 | - if ($fld->id == $field->{$prefix . "id"}) { |
|
372 | + if ($fld->id == $field->{$prefix."id"}) { |
|
373 | 373 | |
374 | 374 | $relationship = $fld->settings; |
375 | 375 | $localTable = $relationship['localTable']; |
@@ -403,17 +403,17 @@ discard block |
||
403 | 403 | |
404 | 404 | if (!class_exists($relationship['localModel'])) { |
405 | 405 | |
406 | - $error = $relationship['localModel'] . " Model not found. Please create the " . $relationship['localModel'] . " model first"; |
|
406 | + $error = $relationship['localModel']." Model not found. Please create the ".$relationship['localModel']." model first"; |
|
407 | 407 | return $this->generateError([$error]); |
408 | 408 | } |
409 | 409 | |
410 | 410 | if (!class_exists($relationship['foreignModel'])) { |
411 | 411 | |
412 | - $error = $relationship['foreignModel'] . " Model not found. Please create the " . $relationship['foreignModel'] . " model first"; |
|
412 | + $error = $relationship['foreignModel']." Model not found. Please create the ".$relationship['foreignModel']." model first"; |
|
413 | 413 | return $this->generateError([$error]); |
414 | 414 | } |
415 | 415 | |
416 | - $fieldName = strtolower(Str::singular($relationship['localTable']) . '_' . $relationship['type'] . '_' . Str::singular($relationship['foreignTable']) . '_relationship'); |
|
416 | + $fieldName = strtolower(Str::singular($relationship['localTable']).'_'.$relationship['type'].'_'.Str::singular($relationship['foreignTable']).'_relationship'); |
|
417 | 417 | $settings = [ |
418 | 418 | 'relationType' => $relationship['type'], |
419 | 419 | 'localModel' => $relationship['localModel'], |