update server builder

This commit is contained in:
gerchek 2022-03-24 04:23:24 +00:00
parent 1871e84a62
commit ca26ee9aad
13 changed files with 236 additions and 1 deletions

View File

@ -2,5 +2,9 @@
'plugin' => [
'name' => 'contact',
'description' => ''
],
'app' => [
'name' => 'October CMS',
'tagline' => 'Getting Back to Basics'
]
];
];

View File

@ -0,0 +1,10 @@
<?php return [
'plugin' => [
'name' => 'contact',
'description' => ''
],
'app' => [
'name' => 'October CMS ru',
'tagline' => 'Getting Back to Basics'
]
];

View File

@ -21,6 +21,35 @@ class CreditClass extends Model
*/
public $table = 'atash_contact_credit';
//public function getStatusOptions($keyValue = null)
//{
// $keyValue = $this->getAttributeFromArray('status');
// $options['Salam'] = 'SALAM';
// $options['Sagbol'] = 'SAGBOL';
//$options['Salam'] = 'SALAM';
//$options['Sag bol'] = e(trans('atash.contact::lang.app.name'));
// $options[e(trans('habinho.school::lang.lesson.monday'))] = e(trans('habinho.school::lang.lesson.monday'));
// $options[e(trans('habinho.school::lang.lesson.tuesday'))] = e(trans('habinho.school::lang.lesson.tuesday'));
// $options[e(trans('habinho.school::lang.lesson.wednesday'))] = e(trans('habinho.school::lang.lesson.wednesday'));
// $options[e(trans('habinho.school::lang.lesson.thursday'))] = e(trans('habinho.school::lang.lesson.thursday'));
// $options[e(trans('habinho.school::lang.lesson.friday'))] = e(trans('habinho.school::lang.lesson.friday'));
// $options[e(trans('habinho.school::lang.lesson.saturday'))] = e(trans('habinho.school::lang.lesson.saturday'));
// $options[e(trans('habinho.school::lang.lesson.sunday'))] = e(trans('habinho.school::lang.lesson.sunday'));
// return $options;
//}
//public function getStatusAttribute($value)
//{
// return $value;
// return $this->getStatusOptions()[$value];
//}
//public $implement = ['RainLab.Translate.Behaviors.TranslatableModel'];
// public $translatable = ['status','action'];
/**
* @var array Validation rules
*/

View File

@ -80,3 +80,18 @@ fields:
label: TYPE
span: auto
type: text
action:
label: Действие
size: small
span: full
type: textarea
status:
label: Status
options:
1: Ugradyldy
2: 'Kabul edildi'
3: Seredilýär
4: Tassyklanan
5: 'Kabul edilmedi'
span: auto
type: balloon-selector

View File

@ -86,3 +86,18 @@ fields:
label: 'Кодовое слово:'
span: auto
type: text
status:
label: Статус
options:
1: Ugradyldy
2: 'Kabul edildi'
3: Seredilýär
4: 'Kart çykaryldy'
5: 'Kart çykarylmady'
span: left
type: balloon-selector
action:
label: Действие
size: small
span: right
type: textarea

View File

@ -0,0 +1,23 @@
<?php namespace Atash\Contact\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateAtashContactCredit10 extends Migration
{
public function up()
{
Schema::table('atash_contact_credit', function($table)
{
$table->text('action')->default('Sagbol')->change();
});
}
public function down()
{
Schema::table('atash_contact_credit', function($table)
{
$table->text('action')->default(null)->change();
});
}
}

View File

@ -0,0 +1,25 @@
<?php namespace Atash\Contact\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateAtashContactCredit6 extends Migration
{
public function up()
{
Schema::table('atash_contact_credit', function($table)
{
$table->string('status')->default('1');
$table->text('action');
});
}
public function down()
{
Schema::table('atash_contact_credit', function($table)
{
$table->dropColumn('status');
$table->dropColumn('action');
});
}
}

View File

@ -0,0 +1,23 @@
<?php namespace Atash\Contact\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateAtashContactCredit7 extends Migration
{
public function up()
{
Schema::table('atash_contact_credit', function($table)
{
$table->text('action')->default('null')->change();
});
}
public function down()
{
Schema::table('atash_contact_credit', function($table)
{
$table->text('action')->default(null)->change();
});
}
}

View File

@ -0,0 +1,23 @@
<?php namespace Atash\Contact\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateAtashContactCredit8 extends Migration
{
public function up()
{
Schema::table('atash_contact_credit', function($table)
{
$table->text('action')->default('null')->change();
});
}
public function down()
{
Schema::table('atash_contact_credit', function($table)
{
$table->text('action')->default(null)->change();
});
}
}

View File

@ -0,0 +1,23 @@
<?php namespace Atash\Contact\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateAtashContactCredit9 extends Migration
{
public function up()
{
Schema::table('atash_contact_credit', function($table)
{
$table->text('action')->nullable()->change();
});
}
public function down()
{
Schema::table('atash_contact_credit', function($table)
{
$table->text('action')->nullable(false)->change();
});
}
}

View File

@ -0,0 +1,25 @@
<?php namespace Atash\Contact\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateAtashContactOnlineCard5 extends Migration
{
public function up()
{
Schema::table('atash_contact_online_card', function($table)
{
$table->string('status')->nullable()->default('1');
$table->text('action')->nullable();
});
}
public function down()
{
Schema::table('atash_contact_online_card', function($table)
{
$table->dropColumn('status');
$table->dropColumn('action');
});
}
}

View File

@ -48,3 +48,21 @@
1.0.17:
- 'Updated table atash_contact_online_card'
- builder_table_update_atash_contact_online_card_4.php
1.0.18:
- 'Updated table atash_contact_credit'
- builder_table_update_atash_contact_credit_6.php
1.0.19:
- 'Updated table atash_contact_credit'
- builder_table_update_atash_contact_credit_7.php
1.0.20:
- 'Updated table atash_contact_credit'
- builder_table_update_atash_contact_credit_8.php
1.0.21:
- 'Updated table atash_contact_credit'
- builder_table_update_atash_contact_credit_9.php
1.0.22:
- 'Updated table atash_contact_credit'
- builder_table_update_atash_contact_credit_10.php
1.0.23:
- 'Updated table atash_contact_online_card'
- builder_table_update_atash_contact_online_card_5.php

View File

@ -330,6 +330,8 @@ Route::group(['prefix' => 'api'], function() {
// dd($Credit);
$Credit->save();
//$data['status'] = $Credit->status;
//$data['action'] = $Credit->action;
return Response::json(compact('data'));