@@ -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 | } else { |
| 99 | 99 | $model = $object->model; |
@@ -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'], |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | 'name' => $column['name']])->first()) { |
| 305 | 305 | return response()->json([ |
| 306 | 306 | 'success' => false, |
| 307 | - 'errors' => ["Field name must be unique. " . $column['name'] . " are duplicate"], |
|
| 307 | + 'errors' => ["Field name must be unique. ".$column['name']." are duplicate"], |
|
| 308 | 308 | ], 400); |
| 309 | 309 | } |
| 310 | 310 | |
@@ -536,7 +536,7 @@ discard block |
||
| 536 | 536 | if (DBM::Template()->where('name', $field['name'])->first()) { |
| 537 | 537 | return response()->json([ |
| 538 | 538 | 'success' => false, |
| 539 | - 'errors' => [" The template name must be unique. " . $field['name'] . " already exist."], |
|
| 539 | + 'errors' => [" The template name must be unique. ".$field['name']." already exist."], |
|
| 540 | 540 | ], 400); |
| 541 | 541 | } |
| 542 | 542 | |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | } |
| 574 | 574 | return response()->json([ |
| 575 | 575 | 'success' => false, |
| 576 | - 'errors' => ['The template '+$request->name . " not found"], |
|
| 576 | + 'errors' => ['The template '+$request->name." not found"], |
|
| 577 | 577 | ], 400); |
| 578 | 578 | } |
| 579 | 579 | |