Browse Source

经理提现

master
Mike 5 years ago
parent
commit
f0bd2db048
  1. 9
      app/Admin/Controllers/LanzuMmWithdrawController.php
  2. 5
      app/Models/LanzuMmWithdraw.php

9
app/Admin/Controllers/LanzuMmWithdrawController.php

@ -3,6 +3,7 @@
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;
@ -19,11 +20,13 @@ class LanzuMmWithdrawController extends AdminController
*/
protected function grid()
{
return Grid::make(new LanzuMmWithdraw(), function (Grid $grid) {
return Grid::make(new LanzuMmWithdraw(['mmInfo']), function (Grid $grid) {
$grid->id->sortable();
$grid->mm_id('提现');
//$grid->mm_id('提现');
$grid->column('mmInfo.name','经理名');
$grid->money;
$grid->status('提现状态');
$grid->status('提现状态')->using([-1=>'拒绝',0=>'审核中',1=>'通过'])
->label([-1=>'danger',0=>'default',1=>'success']);
$grid->created_at('提现时间');
$grid->filter(function (Grid\Filter $filter) {

5
app/Models/LanzuMmWithdraw.php

@ -13,4 +13,9 @@ class LanzuMmWithdraw extends Model
protected $dateFormat = 'U';
protected $table = 'lanzu_mm_withdraw';
public function mmInfo()
{
return $this->hasOne('\App\Models\LanzuMpInfo','id','mm_id');
}
}
Loading…
Cancel
Save