6 changed files with 145 additions and 0 deletions
-
84app/Admin/Controllers/LanzuMpWithdrawController.php
-
16app/Admin/Repositories/LanzuMpWithdraw.php
-
3app/Admin/routes.php
-
16app/Models/LanzuMpWithdraw.php
-
13app/Models/MpWithdraw.php
-
13resources/lang/zh-CN/lanzu-mp-withdraw.php
@ -0,0 +1,84 @@ |
|||
<?php |
|||
|
|||
namespace App\Admin\Controllers; |
|||
|
|||
use App\Admin\Repositories\LanzuMpWithdraw; |
|||
use Dcat\Admin\Form; |
|||
use Dcat\Admin\Grid; |
|||
use Dcat\Admin\Show; |
|||
use Dcat\Admin\Controllers\AdminController; |
|||
|
|||
class LanzuMpWithdrawController extends AdminController |
|||
{ |
|||
/** |
|||
* Make a grid builder. |
|||
* |
|||
* @return Grid |
|||
*/ |
|||
protected function grid() |
|||
{ |
|||
return Grid::make(new LanzuMpWithdraw(), function (Grid $grid) { |
|||
$grid->id->sortable(); |
|||
$grid->mp_id; |
|||
$grid->money; |
|||
$grid->status; |
|||
$grid->created_at; |
|||
$grid->updated_at->sortable(); |
|||
|
|||
$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 LanzuMpWithdraw(), function (Show $show) { |
|||
$show->id; |
|||
$show->mp_id; |
|||
$show->money; |
|||
$show->status; |
|||
$show->created_at; |
|||
$show->updated_at; |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Make a form builder. |
|||
* |
|||
* @return Form |
|||
*/ |
|||
|
|||
public function mpForm(){ |
|||
|
|||
return Form::make(new LanzuMpWithdraw(), function (Form $form) { |
|||
$form->display('id'); |
|||
$form->text('mp_id'); |
|||
$form->text('money'); |
|||
$form->text('status'); |
|||
|
|||
$form->display('created_at'); |
|||
$form->display('updated_at'); |
|||
}); |
|||
} |
|||
protected function form() |
|||
{ |
|||
return Form::make(new LanzuMpWithdraw(), function (Form $form) { |
|||
$form->display('id'); |
|||
$form->text('mp_id'); |
|||
$form->text('money'); |
|||
$form->text('status'); |
|||
|
|||
$form->display('created_at'); |
|||
$form->display('updated_at'); |
|||
}); |
|||
} |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
<?php |
|||
|
|||
namespace App\Admin\Repositories; |
|||
|
|||
use App\Models\LanzuMpWithdraw as Model; |
|||
use Dcat\Admin\Repositories\EloquentRepository; |
|||
|
|||
class LanzuMpWithdraw extends EloquentRepository |
|||
{ |
|||
/** |
|||
* Model. |
|||
* |
|||
* @var string |
|||
*/ |
|||
protected $eloquentClass = Model::class; |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
<?php |
|||
|
|||
namespace App\Models; |
|||
|
|||
use Dcat\Admin\Traits\HasDateTimeFormatter; |
|||
use Illuminate\Database\Eloquent\SoftDeletes; |
|||
use Illuminate\Database\Eloquent\Model; |
|||
|
|||
class LanzuMpWithdraw extends Model |
|||
{ |
|||
use HasDateTimeFormatter; |
|||
use SoftDeletes; |
|||
|
|||
protected $table = 'lanzu_mp_withdraw'; |
|||
|
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
<?php |
|||
|
|||
namespace App\Models; |
|||
|
|||
use Dcat\Admin\Traits\HasDateTimeFormatter; |
|||
|
|||
use Illuminate\Database\Eloquent\Model; |
|||
|
|||
class MpWithdraw extends Model |
|||
{ |
|||
protected $table = 'lanzu_mp_withdraw'; |
|||
protected $dateFormat = 'U'; |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
<?php |
|||
return [ |
|||
'labels' => [ |
|||
'LanzuMpWithdraw' => 'LanzuMpWithdraw', |
|||
], |
|||
'fields' => [ |
|||
'mp_id' => '关联的服务商id', |
|||
'money' => '提现金额', |
|||
'status' => '提现状态', |
|||
], |
|||
'options' => [ |
|||
], |
|||
]; |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue