You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
1.8 KiB
73 lines
1.8 KiB
<?php
|
|
|
|
namespace App\Admin\Controllers;
|
|
|
|
use App\Admin\Repositories\LanzuMmWithdraw;
|
|
use App\Models\LanzuMmWithdraw as MmWithdraw;
|
|
use Dcat\Admin\Form;
|
|
use Dcat\Admin\Grid;
|
|
use Dcat\Admin\Show;
|
|
use Dcat\Admin\Controllers\AdminController;
|
|
use Encore\Admin\Facades\Admin;
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
|
class LanzuMmWithdrawController extends AdminController
|
|
{
|
|
/**
|
|
* Make a grid builder.
|
|
*
|
|
* @return Grid
|
|
*/
|
|
protected function grid()
|
|
{
|
|
return Grid::make(new LanzuMmWithdraw(['mmInfo']), function (Grid $grid) {
|
|
$grid->id->sortable();
|
|
//$grid->mm_id('提现');
|
|
$grid->column('mmInfo.name','经理名');
|
|
$grid->money;
|
|
$grid->status('提现状态')->using([-1=>'拒绝',0=>'审核中',1=>'通过'])
|
|
->label([-1=>'danger',0=>'default',1=>'success']);
|
|
$grid->created_at('提现时间');
|
|
|
|
$grid->filter(function (Grid\Filter $filter) {
|
|
$filter->equal('id');
|
|
|
|
});
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Make a show builder.
|
|
*
|
|
* @param mixed $id
|
|
*
|
|
* @return Show
|
|
*/
|
|
protected function detail($id)
|
|
{
|
|
return Show::make($id, new LanzuMmWithdraw(), function (Show $show) {
|
|
$show->id;
|
|
$show->mm_id;
|
|
$show->money;
|
|
$show->status;
|
|
$show->created_at;
|
|
$show->updated_at;
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Make a form builder.
|
|
*
|
|
* @return Form
|
|
*/
|
|
protected function form()
|
|
{
|
|
return Form::make(new LanzuMmWithdraw(), function (Form $form) {
|
|
$form->display('id');
|
|
$form->text('mm_id');
|
|
$form->text('money');
|
|
$form->display('created_at');
|
|
$form->display('updated_at');
|
|
});
|
|
}
|
|
}
|