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

38 lines
917 B
PHP

<?php
namespace App\Admin\Actions\Show;
use App\Admin\Forms\OrderPackage;
use Dcat\Admin\Show\AbstractTool;
use Dcat\Admin\Widgets\Modal;
class OrderCreatePackage extends AbstractTool
{
public function __construct($id, $title = null)
{
parent::__construct($title);
$this->setKey($id);
}
/**
* @return string
*/
protected $title = '<i class="feather icon-package"></i>&nbsp;发货';
/**
* 按钮样式定义,默认 btn btn-white waves-effect
*
* @var string
*/
protected $style = 'btn-warning';
public function render()
{
$form = OrderPackage::make()->payload(['id'=>$this->getKey()]);
return Modal::make()
->lg()
->title($this->title)
->body($form)
->button("<a href=\"javascript:void(0)\" class=\"btn btn-sm {$this->style}\">{$this->title}</a>&nbsp;&nbsp;");
}
}