6
0
Fork 0
jiqu-library-server/app/Admin/Actions/Show/ProfitSuccess.php

30 lines
769 B
PHP

<?php
namespace App\Admin\Actions\Show;
use Dcat\Admin\Show\AbstractTool;
use Dcat\Admin\Widgets\Modal;
use App\Admin\Forms\ProfitSuccessForm;
use App\Models\OrderProfit;
class ProfitSuccess extends AbstractTool
{
protected $title = '支付';
public function allowed()
{
$info = OrderProfit::find($this->getKey());
return $info->status != 2;
}
public function html()
{
$form = ProfitSuccessForm::make()->payload(['id' => $this->getKey()]);;
return Modal::make()
->lg()
->title($this->title)
->body($form)
->button("<a href=\"javascript:void(0)\" class=\"btn btn-sm btn-success\"><i class=\"feather icon-check\"></i>&nbsp;{$this->title}</a>&nbsp;&nbsp;");
}
}