Files
swiftadmin/app/admin/controller/developer/stubs/controller.stub
2024-07-13 12:53:20 +08:00

36 lines
810 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
declare (strict_types = 1);
namespace {%controllerNamespace%};
use app\AdminController;
use Webman\Http\Request;
use {%modelNamespace%}\{%modelName%} as {%modelName%}Model;
/**
* {%table%}
* {%title%}
* <!--{%pluginClass%}-->
* Class {%controllerName%}
* @package {%controllerNamespace%}
*/
class {%controllerName%} extends AdminController
{
/**
* {%modelName%}模型对象
* @var \{%modelNamespace%}\{%modelName%}
*/
public function __construct()
{
parent::__construct();
$this->model = new {%modelName%}Model;
}
/**
* 默认生成的方法为index/add/edit/del/status 五个方法
* 当创建CURD的时候DIY的函数体和模板为空请自行编写代码
*/
{%controllerDiy%}
}