|
@@ -84,7 +84,7 @@ class DistAdminDistributorController extends AdminController
|
|
|
{
|
|
|
return Show::make($id, DistAdminDistributor::with(['appearance']), function (Show $show) {
|
|
|
$show->field('id');
|
|
|
- $show->field('company_name',);
|
|
|
+ $show->field('company_name');
|
|
|
$show->field('company_address');
|
|
|
$show->field('site_name');
|
|
|
$show->field('domain_type',admin_trans_label('domain'))->as(function ($domainType) {
|
|
@@ -110,6 +110,9 @@ class DistAdminDistributorController extends AdminController
|
|
|
$show->field('enabled')->using(admin_trans_array(config('dictionary.enabled')));
|
|
|
$show->field('created_at');
|
|
|
$show->field('updated_at');
|
|
|
+ $show->field('seo_title');
|
|
|
+ $show->field('seo_keywords');
|
|
|
+ $show->field('seo_description');
|
|
|
// 按钮
|
|
|
$show->disableDeleteButton();
|
|
|
});
|
|
@@ -123,35 +126,40 @@ class DistAdminDistributorController extends AdminController
|
|
|
protected function form()
|
|
|
{
|
|
|
return Form::make(new DistAdminDistributor(), function (Form $form) {
|
|
|
- $form->display('id');
|
|
|
- $form->text('company_name', )->required();
|
|
|
- $form->text('company_address',);
|
|
|
- $form->text('site_name')->required();
|
|
|
+ $form->text('company_name')->width(9,3)->required();
|
|
|
+ $form->text('company_address',)->width(9,3);
|
|
|
+ $form->text('site_name')->width(9,3)->required();
|
|
|
|
|
|
$form->radio('domain_type')
|
|
|
+ ->width(9,3)
|
|
|
->when(0, function (Form $form) {
|
|
|
- $form->text('secondary_domain')->help('Please enter the domain name, such as demo.'.env('TOP_DOMAIN'));
|
|
|
+ $form->text('secondary_domain')->width(9,3)->help('Please enter the domain name, such as demo.'.env('TOP_DOMAIN'));
|
|
|
})
|
|
|
->when(1, function (Form $form) {
|
|
|
- $form->text('custom_domain')->help('Please enter the domain name, such as www.example.com,and bind the domain name to the IP address '.env('DIST_SITE_IP'));
|
|
|
+ $form->text('custom_domain')->width(9,3)->help('Please enter the domain name, such as www.example.com,and bind the domain name to the IP address '.env('DIST_SITE_IP'));
|
|
|
})
|
|
|
->default(0)
|
|
|
->options([0=>'second-level domain',1=>'custom domain'])
|
|
|
->required();
|
|
|
|
|
|
|
|
|
- $form->select('appearance_id',admin_trans_field('appearance'))->options(DistAppearance::selectOptions())->required();
|
|
|
- $form->text('country')->required();
|
|
|
- $form->text('contact_number');
|
|
|
- $form->text('service_hotline');
|
|
|
- $form->text('whats_app');
|
|
|
- $form->text('facebook');
|
|
|
- $form->text('instagram');
|
|
|
- $form->text('youtube');
|
|
|
- $form->text('linkedin');
|
|
|
- $form->text('tiktok');
|
|
|
- $form->textarea('remark');
|
|
|
- $form->switch('enabled')->default(1);
|
|
|
+ $form->select('appearance_id',admin_trans_field('appearance'))->width(9,3)->options(DistAppearance::selectOptions())->required();
|
|
|
+ $form->text('country')->width(9,3)->required();
|
|
|
+ $form->text('contact_number')->width(9,3);
|
|
|
+ $form->text('service_hotline')->width(9,3);
|
|
|
+ $form->text('whats_app')->width(9,3);
|
|
|
+ $form->text('facebook')->width(9,3);
|
|
|
+ $form->text('instagram')->width(9,3);
|
|
|
+ $form->text('youtube')->width(9,3);
|
|
|
+ $form->text('linkedin')->width(9,3);
|
|
|
+ $form->text('tiktok')->width(9,3);
|
|
|
+ $form->textarea('remark')->width(9,3);
|
|
|
+ $form->switch('enabled')->width(9,3)->default(1);
|
|
|
+ $form->text('seo_title')->width(9,3)->required();
|
|
|
+ $form->text('seo_keywords')->width(9,3);
|
|
|
+ $form->textarea('seo_description')->width(9,3);
|
|
|
+
|
|
|
+
|
|
|
//保存前回调
|
|
|
$form->saving(function (Form $form) {
|
|
|
if (!$form->isCreating()) {
|