We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | return [ |
| 4 | 4 | |
| 5 | - /* |
|
| 5 | + /* |
|
| 6 | 6 | |-------------------------------------------------------------------------- |
| 7 | 7 | | Table Name |
| 8 | 8 | |-------------------------------------------------------------------------- |
@@ -10,9 +10,9 @@ discard block |
||
| 10 | 10 | | Database Settings Table Name |
| 11 | 11 | | |
| 12 | 12 | */ |
| 13 | - 'table_name' => 'settings', |
|
| 13 | + 'table_name' => 'settings', |
|
| 14 | 14 | |
| 15 | - /* |
|
| 15 | + /* |
|
| 16 | 16 | |-------------------------------------------------------------------------- |
| 17 | 17 | | Model Name |
| 18 | 18 | |-------------------------------------------------------------------------- |
@@ -20,9 +20,9 @@ discard block |
||
| 20 | 20 | | Settings Eloquent Model Class |
| 21 | 21 | | |
| 22 | 22 | */ |
| 23 | - 'model' => \Backpack\Settings\app\Models\Setting::class, |
|
| 23 | + 'model' => \Backpack\Settings\app\Models\Setting::class, |
|
| 24 | 24 | |
| 25 | - /* |
|
| 25 | + /* |
|
| 26 | 26 | |-------------------------------------------------------------------------- |
| 27 | 27 | | Route |
| 28 | 28 | |-------------------------------------------------------------------------- |
@@ -30,9 +30,9 @@ discard block |
||
| 30 | 30 | | URL Segment aka route to the Settings panel. |
| 31 | 31 | | |
| 32 | 32 | */ |
| 33 | - 'route' => 'setting', |
|
| 33 | + 'route' => 'setting', |
|
| 34 | 34 | |
| 35 | - /* |
|
| 35 | + /* |
|
| 36 | 36 | |-------------------------------------------------------------------------- |
| 37 | 37 | | Config Prefix |
| 38 | 38 | |-------------------------------------------------------------------------- |
@@ -45,9 +45,9 @@ discard block |
||
| 45 | 45 | | - if you leave this empty and your keys match other configuration files you might overwrite them. |
| 46 | 46 | | |
| 47 | 47 | */ |
| 48 | - 'config_prefix' => 'settings', |
|
| 48 | + 'config_prefix' => 'settings', |
|
| 49 | 49 | |
| 50 | - /* |
|
| 50 | + /* |
|
| 51 | 51 | |-------------------------------------------------------------------------- |
| 52 | 52 | | Migration file name |
| 53 | 53 | |-------------------------------------------------------------------------- |
@@ -56,9 +56,9 @@ discard block |
||
| 56 | 56 | | Note: .php extension is automatically added. |
| 57 | 57 | | |
| 58 | 58 | */ |
| 59 | - 'migration_name' => '2015_08_04_131614_create_settings_table', |
|
| 59 | + 'migration_name' => '2015_08_04_131614_create_settings_table', |
|
| 60 | 60 | |
| 61 | - /* |
|
| 61 | + /* |
|
| 62 | 62 | |-------------------------------------------------------------------------- |
| 63 | 63 | | List Table Column character limits |
| 64 | 64 | |-------------------------------------------------------------------------- |
@@ -67,9 +67,9 @@ discard block |
||
| 67 | 67 | | If you need to change the character limits, you can do so here. |
| 68 | 68 | | |
| 69 | 69 | */ |
| 70 | - 'limits' => [ |
|
| 71 | - 'name_field_limit' => 32, |
|
| 72 | - 'value_field_limit' => 32, |
|
| 73 | - 'description_field_limit' => 100, |
|
| 74 | - ], |
|
| 70 | + 'limits' => [ |
|
| 71 | + 'name_field_limit' => 32, |
|
| 72 | + 'value_field_limit' => 32, |
|
| 73 | + 'description_field_limit' => 100, |
|
| 74 | + ], |
|
| 75 | 75 | ]; |
@@ -7,52 +7,52 @@ |
||
| 7 | 7 | |
| 8 | 8 | class SettingCrudController extends CrudController |
| 9 | 9 | { |
| 10 | - use \Backpack\CRUD\app\Http\Controllers\Operations\ListOperation; |
|
| 11 | - use \Backpack\CRUD\app\Http\Controllers\Operations\UpdateOperation; |
|
| 12 | - |
|
| 13 | - public function setup() |
|
| 14 | - { |
|
| 15 | - CRUD::setModel(config('backpack.settings.model', \Backpack\Settings\app\Models\Setting::class)); |
|
| 16 | - CRUD::setEntityNameStrings(trans('backpack::settings.setting_singular'), trans('backpack::settings.setting_plural')); |
|
| 17 | - CRUD::setRoute(backpack_url(config('backpack.settings.route'))); |
|
| 18 | - } |
|
| 19 | - |
|
| 20 | - public function setupListOperation() |
|
| 21 | - { |
|
| 22 | - // only show settings which are marked as active |
|
| 23 | - CRUD::addClause('where', 'active', 1); |
|
| 24 | - |
|
| 25 | - // columns to show in the table view |
|
| 26 | - CRUD::setColumns([ |
|
| 27 | - [ |
|
| 28 | - 'name' => 'name', |
|
| 29 | - 'label' => trans('backpack::settings.name'), |
|
| 30 | - 'limit' => config('backpack.settings.limits.name_field_limit'), |
|
| 31 | - ], |
|
| 32 | - [ |
|
| 33 | - 'name' => 'value', |
|
| 34 | - 'label' => trans('backpack::settings.value'), |
|
| 35 | - 'limit' => config('backpack.settings.limits.value_field_limit'), |
|
| 36 | - ], |
|
| 37 | - [ |
|
| 38 | - 'name' => 'description', |
|
| 39 | - 'label' => trans('backpack::settings.description'), |
|
| 40 | - 'limit' => config('backpack.settings.limits.description_field_limit'), |
|
| 41 | - ], |
|
| 42 | - ]); |
|
| 43 | - } |
|
| 44 | - |
|
| 45 | - public function setupUpdateOperation() |
|
| 46 | - { |
|
| 47 | - CRUD::addField([ |
|
| 48 | - 'name' => 'name', |
|
| 49 | - 'label' => trans('backpack::settings.name'), |
|
| 50 | - 'type' => 'text', |
|
| 51 | - 'attributes' => [ |
|
| 52 | - 'disabled' => 'disabled', |
|
| 53 | - ], |
|
| 54 | - ]); |
|
| 55 | - |
|
| 56 | - CRUD::addField(json_decode(CRUD::getCurrentEntry()->field, true)); |
|
| 57 | - } |
|
| 10 | + use \Backpack\CRUD\app\Http\Controllers\Operations\ListOperation; |
|
| 11 | + use \Backpack\CRUD\app\Http\Controllers\Operations\UpdateOperation; |
|
| 12 | + |
|
| 13 | + public function setup() |
|
| 14 | + { |
|
| 15 | + CRUD::setModel(config('backpack.settings.model', \Backpack\Settings\app\Models\Setting::class)); |
|
| 16 | + CRUD::setEntityNameStrings(trans('backpack::settings.setting_singular'), trans('backpack::settings.setting_plural')); |
|
| 17 | + CRUD::setRoute(backpack_url(config('backpack.settings.route'))); |
|
| 18 | + } |
|
| 19 | + |
|
| 20 | + public function setupListOperation() |
|
| 21 | + { |
|
| 22 | + // only show settings which are marked as active |
|
| 23 | + CRUD::addClause('where', 'active', 1); |
|
| 24 | + |
|
| 25 | + // columns to show in the table view |
|
| 26 | + CRUD::setColumns([ |
|
| 27 | + [ |
|
| 28 | + 'name' => 'name', |
|
| 29 | + 'label' => trans('backpack::settings.name'), |
|
| 30 | + 'limit' => config('backpack.settings.limits.name_field_limit'), |
|
| 31 | + ], |
|
| 32 | + [ |
|
| 33 | + 'name' => 'value', |
|
| 34 | + 'label' => trans('backpack::settings.value'), |
|
| 35 | + 'limit' => config('backpack.settings.limits.value_field_limit'), |
|
| 36 | + ], |
|
| 37 | + [ |
|
| 38 | + 'name' => 'description', |
|
| 39 | + 'label' => trans('backpack::settings.description'), |
|
| 40 | + 'limit' => config('backpack.settings.limits.description_field_limit'), |
|
| 41 | + ], |
|
| 42 | + ]); |
|
| 43 | + } |
|
| 44 | + |
|
| 45 | + public function setupUpdateOperation() |
|
| 46 | + { |
|
| 47 | + CRUD::addField([ |
|
| 48 | + 'name' => 'name', |
|
| 49 | + 'label' => trans('backpack::settings.name'), |
|
| 50 | + 'type' => 'text', |
|
| 51 | + 'attributes' => [ |
|
| 52 | + 'disabled' => 'disabled', |
|
| 53 | + ], |
|
| 54 | + ]); |
|
| 55 | + |
|
| 56 | + CRUD::addField(json_decode(CRUD::getCurrentEntry()->field, true)); |
|
| 57 | + } |
|
| 58 | 58 | } |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | return [ |
| 4 | - /* |
|
| 4 | + /* |
|
| 5 | 5 | |-------------------------------------------------------------------------- |
| 6 | 6 | | Settings Language Lines |
| 7 | 7 | |-------------------------------------------------------------------------- |
@@ -9,10 +9,10 @@ discard block |
||
| 9 | 9 | | The following language lines are used for Laravel Backpack - Settings |
| 10 | 10 | | |
| 11 | 11 | */ |
| 12 | - 'name' => 'Nosaukums', |
|
| 13 | - 'value' => 'Vērtība', |
|
| 14 | - 'description' => 'Apraksts', |
|
| 15 | - 'setting_singular' => 'iestatījums', |
|
| 16 | - 'setting_plural' => 'iestatījumi', |
|
| 12 | + 'name' => 'Nosaukums', |
|
| 13 | + 'value' => 'Vērtība', |
|
| 14 | + 'description' => 'Apraksts', |
|
| 15 | + 'setting_singular' => 'iestatījums', |
|
| 16 | + 'setting_plural' => 'iestatījumi', |
|
| 17 | 17 | |
| 18 | 18 | ]; |