添加用户基本管理
parent
4c22e744fd
commit
3428495fc8
|
|
@ -0,0 +1,117 @@
|
|||
<?php
|
||||
|
||||
namespace App\Admin\Controllers;
|
||||
|
||||
use App\Admin\Repositories\User;
|
||||
use Dcat\Admin\Admin;
|
||||
use Dcat\Admin\Form;
|
||||
use Dcat\Admin\Grid;
|
||||
use Dcat\Admin\Http\Controllers\AdminController;
|
||||
use Dcat\Admin\Layout\Row;
|
||||
use Dcat\Admin\Show;
|
||||
|
||||
class UserController extends AdminController
|
||||
{
|
||||
/**
|
||||
* Make a grid builder.
|
||||
*
|
||||
* @return Grid
|
||||
*/
|
||||
protected function grid()
|
||||
{
|
||||
return Grid::make(new User(), function (Grid $grid) {
|
||||
$grid->column('id')->sortable();
|
||||
$grid->column('username');
|
||||
// $grid->column('password');
|
||||
$grid->column('phone');
|
||||
$grid->column('email');
|
||||
$grid->column('last_login_ip');
|
||||
$grid->column('last_login_at')->sortable();
|
||||
$grid->column('register_ip');
|
||||
// $grid->column('remember_token');
|
||||
$grid->column('status')->using([1=>'正常', -1=>'禁用'])
|
||||
->dot([
|
||||
1 => 'primary',
|
||||
-1 => 'danger',
|
||||
]);
|
||||
$grid->column('created_at');
|
||||
|
||||
/** 操作 **/
|
||||
//新增
|
||||
if (Admin::user()->can('dcat.admin.users.create')) {
|
||||
$grid->disableCreateButton(false);
|
||||
$grid->enableDialogCreate();
|
||||
}
|
||||
//删除以及自定义操作
|
||||
$grid->actions(function (Grid\Displayers\Actions $actions) {
|
||||
$actions->disableView(Admin::user()->cannot('dcat.admin.users.show'));
|
||||
});
|
||||
|
||||
$grid->filter(function (Grid\Filter $filter) {
|
||||
$filter->panel();
|
||||
$filter->like('username')->width(3);
|
||||
$filter->like('phone')->width(3);
|
||||
$filter->like('email')->width(3);
|
||||
// $filter->equal('id');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a show builder.
|
||||
*
|
||||
* @param mixed $id
|
||||
*
|
||||
* @return Show
|
||||
*/
|
||||
protected function detail($id)
|
||||
{
|
||||
return function (Row $row) use ($id) {
|
||||
$row->column(4, function ($column) use ($id) {
|
||||
$column->row(Show::make($id, new User(), function (Show $show) {
|
||||
$show->field('id');
|
||||
$show->field('username');
|
||||
$show->field('phone');
|
||||
$show->field('email');
|
||||
$show->field('last_login_ip');
|
||||
$show->field('last_login_at');
|
||||
$show->field('register_ip');
|
||||
$show->field('created_at');
|
||||
$show->field('updated_at');
|
||||
$show->panel()
|
||||
->tools(function ($tools) {
|
||||
$tools->disableEdit();
|
||||
// $tools->disableList();
|
||||
$tools->disableDelete();
|
||||
// 显示快捷编辑按钮
|
||||
// $tools->showQuickEdit();
|
||||
});
|
||||
}));
|
||||
});
|
||||
$row->column(5, function () {
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a form builder.
|
||||
*
|
||||
* @return Form
|
||||
*/
|
||||
protected function form()
|
||||
{
|
||||
return Form::make(new User(), function (Form $form) {
|
||||
$form->display('id');
|
||||
$form->text('username');
|
||||
$form->mobile('phone')->rules('unique:users,phone');
|
||||
$form->email('email')->rules('unique:users,email');
|
||||
$form->password('password');
|
||||
// 设置错误信息
|
||||
$form->password('password_confirm')->same('password', '两次密码输入不一致');
|
||||
$form->ignore(['password_confirm']);
|
||||
|
||||
$form->display('created_at');
|
||||
$form->display('updated_at');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
<?php
|
||||
|
||||
namespace App\Admin\Controllers;
|
||||
|
||||
use App\Admin\Repositories\Vip;
|
||||
use App\Exceptions\BizException;
|
||||
use App\Models\Vip as VipModel;
|
||||
use Dcat\Admin\Admin;
|
||||
use Dcat\Admin\Form;
|
||||
use Dcat\Admin\Grid;
|
||||
use Dcat\Admin\Http\Controllers\AdminController;
|
||||
use Dcat\Admin\Show;
|
||||
|
||||
class VipController extends AdminController
|
||||
{
|
||||
/**
|
||||
* Make a grid builder.
|
||||
*
|
||||
* @return Grid
|
||||
*/
|
||||
protected function grid()
|
||||
{
|
||||
return Grid::make(new Vip(), function (Grid $grid) {
|
||||
$grid->column('id')->sortable();
|
||||
$grid->column('vip_name');
|
||||
$grid->column('vip_growth_value')->sortable();
|
||||
|
||||
$grid->model()->orderBy('vip_growth_value', 'asc');
|
||||
|
||||
/** 操作 **/
|
||||
//新增
|
||||
if (Admin::user()->can('dcat.admin.vips.create')) {
|
||||
$grid->disableCreateButton(false);
|
||||
$grid->enableDialogCreate();
|
||||
}
|
||||
//修改
|
||||
$grid->showQuickEditButton(Admin::user()->can('dcat.admin.vips.edit'));
|
||||
//删除以及自定义操作
|
||||
$grid->actions(function (Grid\Displayers\Actions $actions) {
|
||||
$actions->disableDelete(Admin::user()->cannot('dcat.admin.vips.destroy'));
|
||||
});
|
||||
|
||||
$grid->filter(function (Grid\Filter $filter) {
|
||||
$filter->panel(false);
|
||||
$filter->like('vip_name');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a show builder.
|
||||
*
|
||||
* @param mixed $id
|
||||
*
|
||||
* @return Show
|
||||
*/
|
||||
protected function detail($id)
|
||||
{
|
||||
return Show::make($id, new Vip(), function (Show $show) {
|
||||
$show->field('id');
|
||||
$show->field('vip_name');
|
||||
$show->field('vip_growth_value');
|
||||
$show->field('created_at');
|
||||
$show->field('updated_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a form builder.
|
||||
*
|
||||
* @return Form
|
||||
*/
|
||||
protected function form()
|
||||
{
|
||||
return Form::make(new Vip(), function (Form $form) {
|
||||
$form->display('id');
|
||||
$form->text('vip_name')->required();
|
||||
$form->number('vip_growth_value')->default(0);
|
||||
|
||||
$form->display('created_at');
|
||||
$form->display('updated_at');
|
||||
});
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$vip = VipModel::findOrFail($id);
|
||||
if ($vip->hasUser()) {
|
||||
throw new BizException(__('vip.options.deny_message'));
|
||||
}
|
||||
return parent::destroy($id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
namespace App\Admin\Repositories;
|
||||
|
||||
use App\Models\User as Model;
|
||||
use Dcat\Admin\Form;
|
||||
use Dcat\Admin\Repositories\EloquentRepository;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class User extends EloquentRepository
|
||||
{
|
||||
/**
|
||||
* Model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $eloquentClass = Model::class;
|
||||
|
||||
/**
|
||||
* 新增记录.
|
||||
*
|
||||
* @param Form $form
|
||||
* @return mixed
|
||||
*/
|
||||
public function store(Form $form)
|
||||
{
|
||||
$result = null;
|
||||
|
||||
DB::transaction(function () use ($form, &$result) {
|
||||
$model = $this->model();
|
||||
|
||||
$updates = $form->updates();
|
||||
|
||||
[$relations, $relationKeyMap] = $this->getRelationInputs($model, $updates);
|
||||
|
||||
if ($relations) {
|
||||
$updates = Arr::except($updates, array_keys($relationKeyMap));
|
||||
}
|
||||
|
||||
// foreach ($updates as $column => $value) {
|
||||
// $model->setAttribute($column, $value);
|
||||
// }
|
||||
|
||||
$result = $model::create($updates);
|
||||
|
||||
$this->updateRelation($form, $model, $relations, $relationKeyMap);
|
||||
});
|
||||
|
||||
return $this->model()->getKey();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace App\Admin\Repositories;
|
||||
|
||||
use App\Models\Vip as Model;
|
||||
use Dcat\Admin\Repositories\EloquentRepository;
|
||||
|
||||
class Vip extends EloquentRepository
|
||||
{
|
||||
/**
|
||||
* Model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $eloquentClass = Model::class;
|
||||
}
|
||||
|
|
@ -58,6 +58,9 @@ Route::group([
|
|||
'index', 'edit', 'update', 'destroy',
|
||||
])->names('product_sku_verifies');
|
||||
|
||||
$router->resource('users', 'UserController');
|
||||
|
||||
$router->resource('vips', 'VipController');
|
||||
|
||||
/** api接口 **/
|
||||
$router->get('api/product-categories', 'ProductCategoryController@categories')->name('api.product_categories');
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
namespace App\Models;
|
||||
|
||||
use App\Constants\Device;
|
||||
use Dcat\Admin\Traits\HasDateTimeFormatter;
|
||||
use Illuminate\Auth\Authenticatable;
|
||||
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
|
||||
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
|
||||
|
|
@ -19,6 +20,7 @@ class User extends Model implements AuthorizableContract, AuthenticatableContrac
|
|||
use Authorizable;
|
||||
use HasFactory;
|
||||
use HasApiTokens;
|
||||
use HasDateTimeFormatter;
|
||||
|
||||
public const STATUS_FROZEN = -1; // 冻结
|
||||
public const STATUS_INACTIVATED = 0; // 未激活
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UserVip extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Dcat\Admin\Traits\HasDateTimeFormatter;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Vip extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use HasDateTimeFormatter;
|
||||
|
||||
public function users()
|
||||
{
|
||||
return $this->belongsToMany(User::class, 'user_vips', 'vip_id', 'user_id');
|
||||
}
|
||||
|
||||
public function hasUser()
|
||||
{
|
||||
return $this->users()->exists();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateVipsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('vips', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('vip_name')->comment('等级名称');
|
||||
$table->unsignedBigInteger('vip_growth_value')->default(0)->comment('等级成长值');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('vips');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUserVipsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_vips', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('user_id')->unique()->comment('用户ID');
|
||||
$table->unsignedBigInteger('vip_id')->comment('会员等级ID');
|
||||
$table->unsignedBigInteger('grow_value')->comment('当前会员成长值');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('user_vips');
|
||||
}
|
||||
}
|
||||
|
|
@ -130,6 +130,10 @@ class AdminPermissionSeeder extends Seeder
|
|||
],
|
||||
],
|
||||
],
|
||||
'vips'=>[
|
||||
'name' =>'会员等级',
|
||||
'curd'=>['index', 'create', 'store', 'edit', 'update', 'destroy'],
|
||||
],
|
||||
];
|
||||
try {
|
||||
DB::begintransaction();
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ namespace Dcat\Admin {
|
|||
* @property Grid\Column|Collection specs
|
||||
* @property Grid\Column|Collection part_id
|
||||
* @property Grid\Column|Collection sku_id
|
||||
* @property Grid\Column|Collection spu_id
|
||||
* @property Grid\Column|Collection status
|
||||
* @property Grid\Column|Collection buynote_id
|
||||
* @property Grid\Column|Collection cost_price
|
||||
|
|
@ -77,7 +78,6 @@ namespace Dcat\Admin {
|
|||
* @property Grid\Column|Collection release_at
|
||||
* @property Grid\Column|Collection sales
|
||||
* @property Grid\Column|Collection sell_price
|
||||
* @property Grid\Column|Collection spu_id
|
||||
* @property Grid\Column|Collection stock
|
||||
* @property Grid\Column|Collection verify_state
|
||||
* @property Grid\Column|Collection vip_price
|
||||
|
|
@ -85,6 +85,7 @@ namespace Dcat\Admin {
|
|||
* @property Grid\Column|Collection feature_id
|
||||
* @property Grid\Column|Collection items
|
||||
* @property Grid\Column|Collection product_spu_id
|
||||
* @property Grid\Column|Collection view_date
|
||||
* @property Grid\Column|Collection code
|
||||
* @property Grid\Column|Collection expires_at
|
||||
* @property Grid\Column|Collection is_use
|
||||
|
|
@ -93,6 +94,8 @@ namespace Dcat\Admin {
|
|||
* @property Grid\Column|Collection gender
|
||||
* @property Grid\Column|Collection inviter_id
|
||||
* @property Grid\Column|Collection nickname
|
||||
* @property Grid\Column|Collection grow_value
|
||||
* @property Grid\Column|Collection vip_id
|
||||
* @property Grid\Column|Collection email
|
||||
* @property Grid\Column|Collection email_verified_at
|
||||
* @property Grid\Column|Collection last_login_at
|
||||
|
|
@ -100,6 +103,8 @@ namespace Dcat\Admin {
|
|||
* @property Grid\Column|Collection phone_verified_at
|
||||
* @property Grid\Column|Collection register_ip
|
||||
* @property Grid\Column|Collection status_remark
|
||||
* @property Grid\Column|Collection vip_growth_value
|
||||
* @property Grid\Column|Collection vip_name
|
||||
*
|
||||
* @method Grid\Column|Collection id(string $label = null)
|
||||
* @method Grid\Column|Collection created_at(string $label = null)
|
||||
|
|
@ -158,6 +163,7 @@ namespace Dcat\Admin {
|
|||
* @method Grid\Column|Collection specs(string $label = null)
|
||||
* @method Grid\Column|Collection part_id(string $label = null)
|
||||
* @method Grid\Column|Collection sku_id(string $label = null)
|
||||
* @method Grid\Column|Collection spu_id(string $label = null)
|
||||
* @method Grid\Column|Collection status(string $label = null)
|
||||
* @method Grid\Column|Collection buynote_id(string $label = null)
|
||||
* @method Grid\Column|Collection cost_price(string $label = null)
|
||||
|
|
@ -167,7 +173,6 @@ namespace Dcat\Admin {
|
|||
* @method Grid\Column|Collection release_at(string $label = null)
|
||||
* @method Grid\Column|Collection sales(string $label = null)
|
||||
* @method Grid\Column|Collection sell_price(string $label = null)
|
||||
* @method Grid\Column|Collection spu_id(string $label = null)
|
||||
* @method Grid\Column|Collection stock(string $label = null)
|
||||
* @method Grid\Column|Collection verify_state(string $label = null)
|
||||
* @method Grid\Column|Collection vip_price(string $label = null)
|
||||
|
|
@ -175,6 +180,7 @@ namespace Dcat\Admin {
|
|||
* @method Grid\Column|Collection feature_id(string $label = null)
|
||||
* @method Grid\Column|Collection items(string $label = null)
|
||||
* @method Grid\Column|Collection product_spu_id(string $label = null)
|
||||
* @method Grid\Column|Collection view_date(string $label = null)
|
||||
* @method Grid\Column|Collection code(string $label = null)
|
||||
* @method Grid\Column|Collection expires_at(string $label = null)
|
||||
* @method Grid\Column|Collection is_use(string $label = null)
|
||||
|
|
@ -183,6 +189,8 @@ namespace Dcat\Admin {
|
|||
* @method Grid\Column|Collection gender(string $label = null)
|
||||
* @method Grid\Column|Collection inviter_id(string $label = null)
|
||||
* @method Grid\Column|Collection nickname(string $label = null)
|
||||
* @method Grid\Column|Collection grow_value(string $label = null)
|
||||
* @method Grid\Column|Collection vip_id(string $label = null)
|
||||
* @method Grid\Column|Collection email(string $label = null)
|
||||
* @method Grid\Column|Collection email_verified_at(string $label = null)
|
||||
* @method Grid\Column|Collection last_login_at(string $label = null)
|
||||
|
|
@ -190,6 +198,8 @@ namespace Dcat\Admin {
|
|||
* @method Grid\Column|Collection phone_verified_at(string $label = null)
|
||||
* @method Grid\Column|Collection register_ip(string $label = null)
|
||||
* @method Grid\Column|Collection status_remark(string $label = null)
|
||||
* @method Grid\Column|Collection vip_growth_value(string $label = null)
|
||||
* @method Grid\Column|Collection vip_name(string $label = null)
|
||||
*/
|
||||
class Grid {}
|
||||
|
||||
|
|
@ -253,6 +263,7 @@ namespace Dcat\Admin {
|
|||
* @property Show\Field|Collection specs
|
||||
* @property Show\Field|Collection part_id
|
||||
* @property Show\Field|Collection sku_id
|
||||
* @property Show\Field|Collection spu_id
|
||||
* @property Show\Field|Collection status
|
||||
* @property Show\Field|Collection buynote_id
|
||||
* @property Show\Field|Collection cost_price
|
||||
|
|
@ -262,7 +273,6 @@ namespace Dcat\Admin {
|
|||
* @property Show\Field|Collection release_at
|
||||
* @property Show\Field|Collection sales
|
||||
* @property Show\Field|Collection sell_price
|
||||
* @property Show\Field|Collection spu_id
|
||||
* @property Show\Field|Collection stock
|
||||
* @property Show\Field|Collection verify_state
|
||||
* @property Show\Field|Collection vip_price
|
||||
|
|
@ -270,6 +280,7 @@ namespace Dcat\Admin {
|
|||
* @property Show\Field|Collection feature_id
|
||||
* @property Show\Field|Collection items
|
||||
* @property Show\Field|Collection product_spu_id
|
||||
* @property Show\Field|Collection view_date
|
||||
* @property Show\Field|Collection code
|
||||
* @property Show\Field|Collection expires_at
|
||||
* @property Show\Field|Collection is_use
|
||||
|
|
@ -278,6 +289,8 @@ namespace Dcat\Admin {
|
|||
* @property Show\Field|Collection gender
|
||||
* @property Show\Field|Collection inviter_id
|
||||
* @property Show\Field|Collection nickname
|
||||
* @property Show\Field|Collection grow_value
|
||||
* @property Show\Field|Collection vip_id
|
||||
* @property Show\Field|Collection email
|
||||
* @property Show\Field|Collection email_verified_at
|
||||
* @property Show\Field|Collection last_login_at
|
||||
|
|
@ -285,6 +298,8 @@ namespace Dcat\Admin {
|
|||
* @property Show\Field|Collection phone_verified_at
|
||||
* @property Show\Field|Collection register_ip
|
||||
* @property Show\Field|Collection status_remark
|
||||
* @property Show\Field|Collection vip_growth_value
|
||||
* @property Show\Field|Collection vip_name
|
||||
*
|
||||
* @method Show\Field|Collection id(string $label = null)
|
||||
* @method Show\Field|Collection created_at(string $label = null)
|
||||
|
|
@ -343,6 +358,7 @@ namespace Dcat\Admin {
|
|||
* @method Show\Field|Collection specs(string $label = null)
|
||||
* @method Show\Field|Collection part_id(string $label = null)
|
||||
* @method Show\Field|Collection sku_id(string $label = null)
|
||||
* @method Show\Field|Collection spu_id(string $label = null)
|
||||
* @method Show\Field|Collection status(string $label = null)
|
||||
* @method Show\Field|Collection buynote_id(string $label = null)
|
||||
* @method Show\Field|Collection cost_price(string $label = null)
|
||||
|
|
@ -352,7 +368,6 @@ namespace Dcat\Admin {
|
|||
* @method Show\Field|Collection release_at(string $label = null)
|
||||
* @method Show\Field|Collection sales(string $label = null)
|
||||
* @method Show\Field|Collection sell_price(string $label = null)
|
||||
* @method Show\Field|Collection spu_id(string $label = null)
|
||||
* @method Show\Field|Collection stock(string $label = null)
|
||||
* @method Show\Field|Collection verify_state(string $label = null)
|
||||
* @method Show\Field|Collection vip_price(string $label = null)
|
||||
|
|
@ -360,6 +375,7 @@ namespace Dcat\Admin {
|
|||
* @method Show\Field|Collection feature_id(string $label = null)
|
||||
* @method Show\Field|Collection items(string $label = null)
|
||||
* @method Show\Field|Collection product_spu_id(string $label = null)
|
||||
* @method Show\Field|Collection view_date(string $label = null)
|
||||
* @method Show\Field|Collection code(string $label = null)
|
||||
* @method Show\Field|Collection expires_at(string $label = null)
|
||||
* @method Show\Field|Collection is_use(string $label = null)
|
||||
|
|
@ -368,6 +384,8 @@ namespace Dcat\Admin {
|
|||
* @method Show\Field|Collection gender(string $label = null)
|
||||
* @method Show\Field|Collection inviter_id(string $label = null)
|
||||
* @method Show\Field|Collection nickname(string $label = null)
|
||||
* @method Show\Field|Collection grow_value(string $label = null)
|
||||
* @method Show\Field|Collection vip_id(string $label = null)
|
||||
* @method Show\Field|Collection email(string $label = null)
|
||||
* @method Show\Field|Collection email_verified_at(string $label = null)
|
||||
* @method Show\Field|Collection last_login_at(string $label = null)
|
||||
|
|
@ -375,6 +393,8 @@ namespace Dcat\Admin {
|
|||
* @method Show\Field|Collection phone_verified_at(string $label = null)
|
||||
* @method Show\Field|Collection register_ip(string $label = null)
|
||||
* @method Show\Field|Collection status_remark(string $label = null)
|
||||
* @method Show\Field|Collection vip_growth_value(string $label = null)
|
||||
* @method Show\Field|Collection vip_name(string $label = null)
|
||||
*/
|
||||
class Show {}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'labels' => [
|
||||
'User' => '会员管理',
|
||||
'users' => '会员管理',
|
||||
],
|
||||
'fields' => [
|
||||
'username' => '用户名',
|
||||
'password' => '密码',
|
||||
'password_confirm'=>'重复密码',
|
||||
'phone' => '手机号',
|
||||
'email' => '邮箱',
|
||||
'status'=>'状态',
|
||||
'last_login_ip' => '最近登录IP',
|
||||
'last_login_at' => '最近登录时间',
|
||||
'register_ip' => '注册IP',
|
||||
'created_at' => '注册时间',
|
||||
],
|
||||
'options' => [
|
||||
],
|
||||
];
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'labels' => [
|
||||
'Vip' => '会员等级',
|
||||
'vips' => '会员等级',
|
||||
],
|
||||
'fields' => [
|
||||
'vip_name' => '等级名称',
|
||||
'vip_growth_value' => '等级成长值',
|
||||
],
|
||||
'options' => [
|
||||
'deny' => '删除失败',
|
||||
'deny_message'=>'当前会员等级下会员人数大于0',
|
||||
],
|
||||
];
|
||||
Loading…
Reference in New Issue