6
0
Fork 0
jiqu-library-server/app/Admin/Actions/Grid/DealerWalletChange.php

37 lines
858 B
PHP

<?php
namespace App\Admin\Actions\Grid;
use App\Admin\Forms\DealerWalletChange as DealerWalletChangeForm;
use Dcat\Admin\Grid\RowAction;
use Dcat\Admin\Widgets\Modal;
class DealerWalletChange extends RowAction
{
public function title()
{
return '<i class="feather grid-action-icon icon-credit-card"></i> 变更余额&nbsp;&nbsp;';
}
/**
* @param Model|Authenticatable|HasPermissions|null $user
*
* @return bool
*/
protected function authorize($user): bool
{
return $user->can('dcat.admin.dealers.wallet_change');
}
public function render()
{
$form = DealerWalletChangeForm::make()->payload(['id'=>$this->getKey()]);
return Modal::make()
->lg()
->title($this->title())
->body($form)
->button($this->title());
}
}