@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $module->name = 'user'; |
| 38 | 38 | $module->icon = 'person'; |
| 39 | 39 | $module->model_class = 'Uccello\Core\Models\User'; |
| 40 | - $module->data = ["package" => "uccello/uccello", "admin" => true, "mandatory" => true]; |
|
| 40 | + $module->data = [ "package" => "uccello/uccello", "admin" => true, "mandatory" => true ]; |
|
| 41 | 41 | $module->save(); |
| 42 | 42 | |
| 43 | 43 | return $module; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $block = new Block(); |
| 58 | 58 | $block->label = 'block.auth'; |
| 59 | 59 | $block->icon = 'lock'; |
| 60 | - $block->data = ['description' => 'block.auth.description']; |
|
| 60 | + $block->data = [ 'description' => 'block.auth.description' ]; |
|
| 61 | 61 | $block->sequence = 0; |
| 62 | 62 | $block->tab_id = $tab->id; |
| 63 | 63 | $block->module_id = $module->id; |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $field->name = 'username'; |
| 69 | 69 | $field->uitype_id = uitype('text')->id; |
| 70 | 70 | $field->displaytype_id = displaytype('everywhere')->id; |
| 71 | - $field->data = ['rules' => 'required|regex:/^[a-zA-Z0-9.-_]+$/|unique:users,username,%id%']; |
|
| 71 | + $field->data = [ 'rules' => 'required|regex:/^[a-zA-Z0-9.-_]+$/|unique:users,username,%id%' ]; |
|
| 72 | 72 | $field->sequence = 0; |
| 73 | 73 | $field->block_id = $block->id; |
| 74 | 74 | $field->module_id = $module->id; |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $field->name = 'last_name'; |
| 91 | 91 | $field->uitype_id = uitype('text')->id; |
| 92 | 92 | $field->displaytype_id = displaytype('everywhere')->id; |
| 93 | - $field->data = ['rules' => 'required']; |
|
| 93 | + $field->data = [ 'rules' => 'required' ]; |
|
| 94 | 94 | $field->sequence = 2; |
| 95 | 95 | $field->block_id = $block->id; |
| 96 | 96 | $field->module_id = $module->id; |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $field->name = 'is_admin'; |
| 102 | 102 | $field->uitype_id = uitype('boolean')->id; |
| 103 | 103 | $field->displaytype_id = displaytype('everywhere')->id; |
| 104 | - $field->data = ['module' => 'domain', 'field' => 'name']; |
|
| 104 | + $field->data = [ 'module' => 'domain', 'field' => 'name' ]; |
|
| 105 | 105 | $field->sequence = 3; |
| 106 | 106 | $field->block_id = $block->id; |
| 107 | 107 | $field->module_id = $module->id; |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | $field->name = 'password'; |
| 113 | 113 | $field->uitype_id = uitype('password')->id; |
| 114 | 114 | $field->displaytype_id = displaytype('create')->id; |
| 115 | - $field->data = ['rules' => 'required|min:6', 'repeated' => true]; |
|
| 115 | + $field->data = [ 'rules' => 'required|min:6', 'repeated' => true ]; |
|
| 116 | 116 | $field->sequence = 4; |
| 117 | 117 | $field->block_id = $block->id; |
| 118 | 118 | $field->module_id = $module->id; |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $field->name = 'email'; |
| 133 | 133 | $field->uitype_id = uitype('email')->id; |
| 134 | 134 | $field->displaytype_id = displaytype('everywhere')->id; |
| 135 | - $field->data = ['rules' => 'required|email|unique:users,email,%id%']; |
|
| 135 | + $field->data = [ 'rules' => 'required|email|unique:users,email,%id%' ]; |
|
| 136 | 136 | $field->sequence = 0; |
| 137 | 137 | $field->block_id = $block->id; |
| 138 | 138 | $field->module_id = $module->id; |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | $filter->user_id = null; |
| 158 | 158 | $filter->name = 'filter.all'; |
| 159 | 159 | $filter->type = 'list'; |
| 160 | - $filter->columns = ['id', 'username', 'first_name', 'last_name', 'email', 'created_at', 'updated_at']; |
|
| 160 | + $filter->columns = [ 'id', 'username', 'first_name', 'last_name', 'email', 'created_at', 'updated_at' ]; |
|
| 161 | 161 | $filter->conditions = null; |
| 162 | 162 | $filter->order_by = null; |
| 163 | 163 | $filter->is_default = true; |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create($this->tablePrefix . 'domains_modules', function (Blueprint $table) { |
|
| 16 | + Schema::create($this->tablePrefix.'domains_modules', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->unsignedInteger('domain_id'); |
| 19 | 19 | $table->unsignedInteger('module_id'); |
@@ -21,15 +21,15 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | // Foreign keys |
| 23 | 23 | $table->foreign('domain_id') |
| 24 | - ->references('id')->on($this->tablePrefix . 'domains') |
|
| 24 | + ->references('id')->on($this->tablePrefix.'domains') |
|
| 25 | 25 | ->onDelete('cascade'); |
| 26 | 26 | |
| 27 | 27 | $table->foreign('module_id') |
| 28 | - ->references('id')->on($this->tablePrefix . 'modules') |
|
| 28 | + ->references('id')->on($this->tablePrefix.'modules') |
|
| 29 | 29 | ->onDelete('cascade'); |
| 30 | 30 | |
| 31 | 31 | // Unique keys |
| 32 | - $table->unique(['domain_id', 'module_id']); |
|
| 32 | + $table->unique([ 'domain_id', 'module_id' ]); |
|
| 33 | 33 | }); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -40,6 +40,6 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public function down() |
| 42 | 42 | { |
| 43 | - Schema::dropIfExists($this->tablePrefix . 'domains_modules'); |
|
| 43 | + Schema::dropIfExists($this->tablePrefix.'domains_modules'); |
|
| 44 | 44 | } |
| 45 | 45 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $module->name = 'profile'; |
| 38 | 38 | $module->icon = 'lock'; |
| 39 | 39 | $module->model_class = 'Uccello\Core\Models\Profile'; |
| 40 | - $module->data = ["package" => "uccello/uccello", "admin" => true, "mandatory" => true]; |
|
| 40 | + $module->data = [ "package" => "uccello/uccello", "admin" => true, "mandatory" => true ]; |
|
| 41 | 41 | $module->save(); |
| 42 | 42 | |
| 43 | 43 | return $module; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $field->name = 'name'; |
| 68 | 68 | $field->uitype_id = uitype('text')->id; |
| 69 | 69 | $field->displaytype_id = displaytype('everywhere')->id; |
| 70 | - $field->data = ['rules' => 'required']; |
|
| 70 | + $field->data = [ 'rules' => 'required' ]; |
|
| 71 | 71 | $field->sequence = 0; |
| 72 | 72 | $field->block_id = $block->id; |
| 73 | 73 | $field->module_id = $module->id; |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $field->name = 'description'; |
| 79 | 79 | $field->uitype_id = uitype('textarea')->id; |
| 80 | 80 | $field->displaytype_id = displaytype('everywhere')->id; |
| 81 | - $field->data = ['large' => true]; |
|
| 81 | + $field->data = [ 'large' => true ]; |
|
| 82 | 82 | $field->sequence = 1; |
| 83 | 83 | $field->block_id = $block->id; |
| 84 | 84 | $field->module_id = $module->id; |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | $filter->user_id = null; |
| 94 | 94 | $filter->name = 'filter.all'; |
| 95 | 95 | $filter->type = 'list'; |
| 96 | - $filter->columns = ['id', 'name', 'description', 'created_at', 'updated_at']; |
|
| 96 | + $filter->columns = [ 'id', 'name', 'description', 'created_at', 'updated_at' ]; |
|
| 97 | 97 | $filter->conditions = null; |
| 98 | 98 | $filter->order_by = null; |
| 99 | 99 | $filter->is_default = true; |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | public function down() |
| 27 | 27 | { |
| 28 | 28 | // Drop table |
| 29 | - Schema::dropIfExists($this->tablePrefix . 'settings'); |
|
| 29 | + Schema::dropIfExists($this->tablePrefix.'settings'); |
|
| 30 | 30 | |
| 31 | 31 | // Delete module |
| 32 | 32 | Module::where('name', 'settings')->forceDelete(); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $module->name = 'domain'; |
| 41 | 41 | $module->icon = 'domain'; |
| 42 | 42 | $module->model_class = 'Uccello\Core\Models\Domain'; |
| 43 | - $module->data = ["package" => "uccello/uccello", "admin" => true, "mandatory" => true]; |
|
| 43 | + $module->data = [ "package" => "uccello/uccello", "admin" => true, "mandatory" => true ]; |
|
| 44 | 44 | $module->save(); |
| 45 | 45 | |
| 46 | 46 | return $module; |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $field->name = 'name'; |
| 71 | 71 | $field->uitype_id = uitype('text')->id; |
| 72 | 72 | $field->displaytype_id = displaytype('everywhere')->id; |
| 73 | - $field->data = ['rules' => 'required|unique:' . $this->getTablePrefix() . 'domains,name,%id%']; |
|
| 73 | + $field->data = [ 'rules' => 'required|unique:'.$this->getTablePrefix().'domains,name,%id%' ]; |
|
| 74 | 74 | $field->sequence = 0; |
| 75 | 75 | $field->block_id = $block->id; |
| 76 | 76 | $field->module_id = $module->id; |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $field->name = 'parent'; |
| 82 | 82 | $field->uitype_id = uitype('entity')->id; |
| 83 | 83 | $field->displaytype_id = displaytype('everywhere')->id; |
| 84 | - $field->data = ['module' => 'domain', 'field' => 'name']; |
|
| 84 | + $field->data = [ 'module' => 'domain', 'field' => 'name' ]; |
|
| 85 | 85 | $field->sequence = 1; |
| 86 | 86 | $field->block_id = $block->id; |
| 87 | 87 | $field->module_id = $module->id; |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | $field->name = 'description'; |
| 93 | 93 | $field->uitype_id = uitype('textarea')->id; |
| 94 | 94 | $field->displaytype_id = displaytype('everywhere')->id; |
| 95 | - $field->data = ['large' => true]; |
|
| 95 | + $field->data = [ 'large' => true ]; |
|
| 96 | 96 | $field->sequence = 2; |
| 97 | 97 | $field->block_id = $block->id; |
| 98 | 98 | $field->module_id = $module->id; |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | $filter->user_id = null; |
| 108 | 108 | $filter->name = 'filter.all'; |
| 109 | 109 | $filter->type = 'list'; |
| 110 | - $filter->columns = ['id', 'name', 'description', 'parent', 'created_at', 'updated_at']; |
|
| 110 | + $filter->columns = [ 'id', 'name', 'description', 'parent', 'created_at', 'updated_at' ]; |
|
| 111 | 111 | $filter->conditions = null; |
| 112 | 112 | $filter->order_by = null; |
| 113 | 113 | $filter->is_default = true; |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create($this->tablePrefix . 'relatedlists', function (Blueprint $table) { |
|
| 16 | + Schema::create($this->tablePrefix.'relatedlists', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->unsignedInteger('module_id'); |
| 19 | 19 | $table->unsignedInteger('related_module_id'); |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | $table->unsignedInteger('related_field_id')->nullable(); |
| 22 | 22 | $table->string('label'); |
| 23 | 23 | $table->string('icon')->nullable(); |
| 24 | - $table->enum('type', ['n-1', 'n-n']); |
|
| 24 | + $table->enum('type', [ 'n-1', 'n-n' ]); |
|
| 25 | 25 | $table->string('method'); |
| 26 | 26 | $table->unsignedInteger('sequence'); |
| 27 | 27 | $table->text('data')->nullable(); |
@@ -29,23 +29,23 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | // Foreign keys |
| 31 | 31 | $table->foreign('module_id') |
| 32 | - ->references('id')->on($this->tablePrefix . 'modules') |
|
| 32 | + ->references('id')->on($this->tablePrefix.'modules') |
|
| 33 | 33 | ->onDelete('cascade'); |
| 34 | 34 | |
| 35 | 35 | $table->foreign('related_module_id') |
| 36 | - ->references('id')->on($this->tablePrefix . 'modules') |
|
| 36 | + ->references('id')->on($this->tablePrefix.'modules') |
|
| 37 | 37 | ->onDelete('cascade'); |
| 38 | 38 | |
| 39 | 39 | $table->foreign('tab_id') |
| 40 | - ->references('id')->on($this->tablePrefix . 'tabs') |
|
| 40 | + ->references('id')->on($this->tablePrefix.'tabs') |
|
| 41 | 41 | ->onDelete('cascade'); |
| 42 | 42 | |
| 43 | 43 | $table->foreign('related_field_id') |
| 44 | - ->references('id')->on($this->tablePrefix . 'fields') |
|
| 44 | + ->references('id')->on($this->tablePrefix.'fields') |
|
| 45 | 45 | ->onDelete('cascade'); |
| 46 | 46 | |
| 47 | 47 | // Unique keys |
| 48 | - $table->unique(['module_id', 'related_module_id', 'label'], 'relatedlists_unique_key'); |
|
| 48 | + $table->unique([ 'module_id', 'related_module_id', 'label' ], 'relatedlists_unique_key'); |
|
| 49 | 49 | }); |
| 50 | 50 | } |
| 51 | 51 | |
@@ -56,6 +56,6 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | public function down() |
| 58 | 58 | { |
| 59 | - Schema::dropIfExists($this->tablePrefix . 'relatedlists'); |
|
| 59 | + Schema::dropIfExists($this->tablePrefix.'relatedlists'); |
|
| 60 | 60 | } |
| 61 | 61 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | return [ |
| 4 | - 'skin' => 'uccello', |
|
| 4 | + 'skin' => 'uccello', |
|
| 5 | 5 | ]; |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -Route::name('uccello.api.')->group(function () { |
|
| 3 | +Route::name('uccello.api.')->group(function() { |
|
| 4 | 4 | |
| 5 | 5 | // Adapt params if we use or not multi domains |
| 6 | 6 | if (!uccello()->useMultiDomains()) { |
@@ -15,8 +15,8 @@ discard block |
||
| 15 | 15 | Route::get('refresh', 'Core\ApiAuthController@refresh')->name('refresh'); |
| 16 | 16 | |
| 17 | 17 | Route::get($domainAndModuleParams, 'Core\ApiController@index')->name('index'); |
| 18 | - Route::get($domainAndModuleParams . '/{id}', 'Core\ApiController@show')->name('show'); |
|
| 18 | + Route::get($domainAndModuleParams.'/{id}', 'Core\ApiController@show')->name('show'); |
|
| 19 | 19 | Route::post($domainAndModuleParams, 'Core\ApiController@store')->name('store'); |
| 20 | - Route::post($domainAndModuleParams . '/{id}', 'Core\ApiController@update')->name('update'); |
|
| 21 | - Route::delete($domainAndModuleParams . '/{id}', 'Core\ApiController@destroy')->name('destroy'); |
|
| 20 | + Route::post($domainAndModuleParams.'/{id}', 'Core\ApiController@update')->name('update'); |
|
| 21 | + Route::delete($domainAndModuleParams.'/{id}', 'Core\ApiController@destroy')->name('destroy'); |
|
| 22 | 22 | }); |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | Route::get('logout', '\App\Http\Controllers\Auth\LoginController@logout')->name('logout'); |
| 4 | 4 | |
| 5 | -Route::name('uccello.')->group(function () { |
|
| 5 | +Route::name('uccello.')->group(function() { |
|
| 6 | 6 | |
| 7 | 7 | // Adapt params if we use or not multi domains |
| 8 | 8 | if (!uccello()->useMultiDomains()) { |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | ->defaults('module', 'user') |
| 27 | 27 | ->name('user.edit'); |
| 28 | 28 | |
| 29 | - Route::post($domainParam . '/domain', 'Domain\EditController@save') |
|
| 29 | + Route::post($domainParam.'/domain', 'Domain\EditController@save') |
|
| 30 | 30 | ->defaults('module', 'domain') |
| 31 | 31 | ->name('domain.save'); |
| 32 | 32 | |