@@ -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 | |
@@ -34,8 +34,8 @@ discard block |
||
| 34 | 34 | $files = $request->file($column); |
| 35 | 35 | $values = []; |
| 36 | 36 | foreach ($files as $file) { |
| 37 | - $fileName = Str::random(config('dbm.filesystem.random_length')) . '.' . $file->getClientOriginalExtension(); |
|
| 38 | - $path = 'public/dbm/' . $tableName; |
|
| 37 | + $fileName = Str::random(config('dbm.filesystem.random_length')).'.'.$file->getClientOriginalExtension(); |
|
| 38 | + $path = 'public/dbm/'.$tableName; |
|
| 39 | 39 | $file->storeAs($path, $fileName); |
| 40 | 40 | $values[] = $fileName; |
| 41 | 41 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $fieldType = $this->getFieldType($tableName, $column); |
| 62 | 62 | |
| 63 | 63 | if (!in_array($fieldType, Type::getTypes())) { |
| 64 | - $this->generateError([$fieldType . " type not supported."]); |
|
| 64 | + $this->generateError([$fieldType." type not supported."]); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | if ($fieldType != 'timestamp') { |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | } else if ($action == 'update' && isset($settings->update)) { |
| 175 | 175 | $updateSettings = $settings->update; |
| 176 | 176 | $localKey = $updateSettings->localKey; |
| 177 | - $rules = $updateSettings->rules . ',' . $columns->{$localKey}; |
|
| 177 | + $rules = $updateSettings->rules.','.$columns->{$localKey}; |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | return $rules; |
@@ -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 | |
@@ -39,8 +39,8 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | protected function findComposer() |
| 41 | 41 | { |
| 42 | - if (file_exists(getcwd() . '/composer.phar')) { |
|
| 43 | - return '"' . PHP_BINARY . '" ' . getcwd() . '/composer.phar'; |
|
| 42 | + if (file_exists(getcwd().'/composer.phar')) { |
|
| 43 | + return '"'.PHP_BINARY.'" '.getcwd().'/composer.phar'; |
|
| 44 | 44 | } |
| 45 | 45 | return 'composer'; |
| 46 | 46 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @var string |
| 28 | 28 | */ |
| 29 | - protected $seedersPath = __DIR__ . '/../../database/seeds/'; |
|
| 29 | + protected $seedersPath = __DIR__.'/../../database/seeds/'; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Get Option |
@@ -47,8 +47,8 @@ discard block |
||
| 47 | 47 | */ |
| 48 | 48 | protected function findComposer() |
| 49 | 49 | { |
| 50 | - if (file_exists(getcwd() . '/composer.phar')) { |
|
| 51 | - return '"' . PHP_BINARY . '" ' . getcwd() . '/composer.phar'; |
|
| 50 | + if (file_exists(getcwd().'/composer.phar')) { |
|
| 51 | + return '"'.PHP_BINARY.'" '.getcwd().'/composer.phar'; |
|
| 52 | 52 | } |
| 53 | 53 | return 'composer'; |
| 54 | 54 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | $this->info('Dumping the autoloaded files and reloading all new files'); |
| 76 | 76 | $composer = $this->findComposer(); |
| 77 | - $process = new Process($composer . ' dump-autoload'); |
|
| 77 | + $process = new Process($composer.' dump-autoload'); |
|
| 78 | 78 | $process->setTimeout(null); // Setting timeout to null to prevent installation from stopping at a certain point in time |
| 79 | 79 | $process->setWorkingDirectory(base_path())->run(); |
| 80 | 80 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $this->info('Seeding...'); |
| 99 | 99 | // Seeding Dummy Data |
| 100 | 100 | $class = 'DatabaseManagerSeeder'; |
| 101 | - $file = $this->seedersPath . $class . '.php'; |
|
| 101 | + $file = $this->seedersPath.$class.'.php'; |
|
| 102 | 102 | if (file_exists($file) && !class_exists($class)) { |
| 103 | 103 | require_once $file; |
| 104 | 104 | } |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | 'prefix' => 'database', |
| 5 | 5 | 'middleware' => 'auth:api', |
| 6 | 6 | 'namespace' => config('dbm.controller_namespace'), |
| 7 | -], function () { |
|
| 7 | +], function() { |
|
| 8 | 8 | |
| 9 | 9 | // Helpers Route |
| 10 | 10 | Route::get('assets', 'ManagerController@assets')->name('dbm.asset'); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | Route::put('/relationship', 'RelationController@update'); |
| 45 | 45 | Route::delete('/relationship', 'RelationController@delete'); |
| 46 | 46 | // Table |
| 47 | - Route::group(['prefix' => 'table'], function () { |
|
| 47 | + Route::group(['prefix' => 'table'], function() { |
|
| 48 | 48 | Route::get('/details/{table}', 'RecordController@getTableDetails'); |
| 49 | 49 | Route::get('/columns/{table}', 'TableController@getTableColumns'); |
| 50 | 50 | }); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | Route::group([ |
| 60 | 60 | 'prefix' => 'database', |
| 61 | 61 | 'namespace' => config('dbm.controller_namespace'), |
| 62 | -], function () { |
|
| 62 | +], function() { |
|
| 63 | 63 | // User |
| 64 | 64 | Route::post('/login', 'UserController@login'); |
| 65 | 65 | // Route::post('/oauth/token', 'UserController@getPersonalAccessToken'); |
@@ -21,6 +21,6 @@ |
||
| 21 | 21 | |
| 22 | 22 | $type = $fieldDeclaration['autoincrement'] ? 'smallserial' : 'smallint'; |
| 23 | 23 | |
| 24 | - return $type . $commonIntegerTypeDeclaration; |
|
| 24 | + return $type.$commonIntegerTypeDeclaration; |
|
| 25 | 25 | } |
| 26 | 26 | } |
@@ -24,10 +24,10 @@ |
||
| 24 | 24 | $pdo = DB::connection()->getPdo(); |
| 25 | 25 | |
| 26 | 26 | // trim the values |
| 27 | - $fieldDeclaration['allowed'] = array_map(function ($value) use ($pdo) { |
|
| 27 | + $fieldDeclaration['allowed'] = array_map(function($value) use ($pdo) { |
|
| 28 | 28 | return $pdo->quote(trim($value)); |
| 29 | 29 | }, $allowed); |
| 30 | 30 | |
| 31 | - return 'set(' . implode(', ', $fieldDeclaration['allowed']) . ')'; |
|
| 31 | + return 'set('.implode(', ', $fieldDeclaration['allowed']).')'; |
|
| 32 | 32 | } |
| 33 | 33 | } |