微调
This commit is contained in:
@@ -12,10 +12,9 @@ use RuLong\Identity\Models\Identity;
|
||||
|
||||
class RuleController extends AdminController
|
||||
{
|
||||
|
||||
protected $title = '规则管理';
|
||||
|
||||
protected function grid()
|
||||
protected function grid(): Grid
|
||||
{
|
||||
$grid = new Grid(new ActivityRule);
|
||||
|
||||
@@ -34,15 +33,15 @@ class RuleController extends AdminController
|
||||
]);
|
||||
|
||||
$grid->column('created_at', '创建时间');
|
||||
|
||||
return $grid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a form builder.
|
||||
*
|
||||
* @return Form
|
||||
*/
|
||||
protected function form()
|
||||
protected function form(): Form
|
||||
{
|
||||
$form = new Form(new ActivityRule);
|
||||
|
||||
@@ -58,7 +57,7 @@ class RuleController extends AdminController
|
||||
$code = $form->code;
|
||||
|
||||
$ticket = explode('-', $code);
|
||||
if (!is_array($ticket) || count($ticket) != 3) {
|
||||
if (! is_array($ticket) || count($ticket) != 3) {
|
||||
$error = new MessageBag([
|
||||
'title' => '错误',
|
||||
'message' => '规则编号格式错误',
|
||||
@@ -79,5 +78,4 @@ class RuleController extends AdminController
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user