@@ -20,7 +20,7 @@ |
||
| 20 | 20 | $dsn = config('database.connections.mongodb.dsn'); |
| 21 | 21 | |
| 22 | 22 | if (!$dsn) { |
| 23 | - $dsn = 'mongodb://' . $host . ':' . $port . ($auth_db ? "/" . $auth_db : ''); |
|
| 23 | + $dsn = 'mongodb://'.$host.':'.$port.($auth_db ? "/".$auth_db : ''); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | self::$connection = new Client($dsn); |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | { |
| 72 | 72 | $provider = config('auth.guards.api.provider'); |
| 73 | 73 | |
| 74 | - return $this->belongsTo(config('auth.providers.' . $provider . '.model')); |
|
| 74 | + return $this->belongsTo(config('auth.providers.'.$provider.'.model')); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -Route::group(['prefix' => 'database', 'namespace' => config('dbm.controller_namespace')], function () { |
|
| 2 | +Route::group(['prefix' => 'database', 'namespace' => config('dbm.controller_namespace')], function() { |
|
| 3 | 3 | //Database Table |
| 4 | 4 | Route::get('/', 'DatabaseController@index'); |
| 5 | 5 | Route::get('table/builder/{name}', 'DatabaseController@index'); |
@@ -171,7 +171,7 @@ |
||
| 171 | 171 | $columns = $request->fields; |
| 172 | 172 | $permission = $request->isCrudExists ? 'update' : 'create'; |
| 173 | 173 | |
| 174 | - if (($response = DBM::authorize('crud.' . $permission)) !== true) { |
|
| 174 | + if (($response = DBM::authorize('crud.'.$permission)) !== true) { |
|
| 175 | 175 | return $response; |
| 176 | 176 | } |
| 177 | 177 | |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | $prefix = (Driver::isMongoDB()) ? "_" : ""; |
| 36 | 36 | |
| 37 | 37 | foreach ($fields as $fld) { |
| 38 | - if ($fld->id == $field->{$prefix . "id"}) { |
|
| 38 | + if ($fld->id == $field->{$prefix."id"}) { |
|
| 39 | 39 | |
| 40 | 40 | $relationship = $fld->settings; |
| 41 | 41 | $localTable = $relationship['localTable']; |
@@ -260,7 +260,7 @@ |
||
| 260 | 260 | 'name' => $column['name']])->first()) { |
| 261 | 261 | return response()->json([ |
| 262 | 262 | 'success' => false, |
| 263 | - 'errors' => ["Field name must be unique. " . $column['name'] . " are duplicate"], |
|
| 263 | + 'errors' => ["Field name must be unique. ".$column['name']." are duplicate"], |
|
| 264 | 264 | ], 400); |
| 265 | 265 | } |
| 266 | 266 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | if (DBM::Template()->where('name', $field['name'])->first()) { |
| 40 | 40 | return response()->json([ |
| 41 | 41 | 'success' => false, |
| 42 | - 'errors' => [" The template name must be unique. " . $field['name'] . " already exist."], |
|
| 42 | + 'errors' => [" The template name must be unique. ".$field['name']." already exist."], |
|
| 43 | 43 | ], 400); |
| 44 | 44 | } |
| 45 | 45 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | return response()->json([ |
| 78 | 78 | 'success' => false, |
| 79 | - 'errors' => ['The template '+$request->name . " not found"], |
|
| 79 | + 'errors' => ['The template '+$request->name." not found"], |
|
| 80 | 80 | ], 400); |
| 81 | 81 | } |
| 82 | 82 | } |
@@ -228,7 +228,7 @@ |
||
| 228 | 228 | |
| 229 | 229 | if (!empty($query) && !empty($searchColumn)) { |
| 230 | 230 | $records = DBM::model($model, $tableName) |
| 231 | - ->where($searchColumn, 'LIKE', '%' . $query . '%') |
|
| 231 | + ->where($searchColumn, 'LIKE', '%'.$query.'%') |
|
| 232 | 232 | ->paginate($perPage); |
| 233 | 233 | } |
| 234 | 234 | |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | $indexType = $indexDetails['type']; |
| 67 | 67 | $options = $indexDetails['options']; |
| 68 | 68 | |
| 69 | - $options['name'] = strtolower($collection->getCollectionName() . "_" . $column . "_" . $type); |
|
| 69 | + $options['name'] = strtolower($collection->getCollectionName()."_".$column."_".$type); |
|
| 70 | 70 | |
| 71 | 71 | $options['ns'] = $collection->getNamespace(); |
| 72 | 72 | |