This commit is contained in:
2022-04-08 16:21:47 +08:00
parent c3461e1335
commit 491a907250
5 changed files with 49 additions and 61 deletions

View File

@@ -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;
}
}