25 lines
582 B
PHP
25 lines
582 B
PHP
<?php
|
|
|
|
namespace App\Admin\Actions\RowActions;
|
|
|
|
use Dcat\Admin\Grid\RowAction;
|
|
use App\Admin\Actions\Forms\SendQuanTicket as SendQuanTicketForm;
|
|
use Dcat\Admin\Widgets\Modal;
|
|
|
|
class SendUserTicket extends RowAction
|
|
{
|
|
|
|
protected $title = '发放优惠券';
|
|
|
|
public function render()
|
|
{
|
|
// 实例化表单类并传递自定义参数
|
|
$form = SendQuanTicketForm::make()->payload(['id' => $this->getKey()]);
|
|
|
|
return Modal::make()
|
|
->lg()
|
|
->title($this->title)
|
|
->body($form)
|
|
->button($this->title);
|
|
}
|
|
} |