添加初始化账号
This commit is contained in:
21
extend/catcher/command/stubs/command.stub
Normal file
21
extend/catcher/command/stubs/command.stub
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace {NAMESPACE};
|
||||
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\input\Argument;
|
||||
use think\console\input\Option;
|
||||
use think\console\Output;
|
||||
|
||||
class {CLASS}Command extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('')
|
||||
->setDescription('');
|
||||
}
|
||||
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
}
|
||||
}
|
35
extend/catcher/command/stubs/controller.stub
Normal file
35
extend/catcher/command/stubs/controller.stub
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
namespace {NAMESPACE};
|
||||
|
||||
use app\BaseController;
|
||||
|
||||
class {CLASS} extends BaseController
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return $this->fetch('{MODULE}::index');
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return $this->fetch('{MODULE}::create');
|
||||
}
|
||||
|
||||
public function save()
|
||||
{}
|
||||
|
||||
public function read()
|
||||
{}
|
||||
|
||||
public function edit()
|
||||
{
|
||||
return $this->fetch('{MODULE}::edit');
|
||||
}
|
||||
|
||||
public function update()
|
||||
{}
|
||||
|
||||
public function delete()
|
||||
{}
|
||||
|
||||
}
|
11
extend/catcher/command/stubs/event.stub
Normal file
11
extend/catcher/command/stubs/event.stub
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace {NAMESPACE};
|
||||
|
||||
class {CLASS}
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
}
|
||||
}
|
33
extend/catcher/command/stubs/migration.stub
Normal file
33
extend/catcher/command/stubs/migration.stub
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class {CLASS} extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
13
extend/catcher/command/stubs/module.stub
Normal file
13
extend/catcher/command/stubs/module.stub
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "",
|
||||
"alias": "{MODULE}",
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
"order": 0,
|
||||
"services": [
|
||||
"{SERVICE}"
|
||||
],
|
||||
"aliases": {},
|
||||
"files": [],
|
||||
"requires": []
|
||||
}
|
17
extend/catcher/command/stubs/request.stub
Normal file
17
extend/catcher/command/stubs/request.stub
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
namespace {NAMESPACE};
|
||||
|
||||
use catcher\base\BaseRequest;
|
||||
|
||||
class {CLASS}Request extends BaseRequest
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @time 2019年11月27日
|
||||
* @return string
|
||||
*/
|
||||
protected function getValidate()
|
||||
{
|
||||
// TODO: Implement getValidate() method.
|
||||
}
|
||||
}
|
5
extend/catcher/command/stubs/route.stub
Normal file
5
extend/catcher/command/stubs/route.stub
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
// you should user `$router`
|
||||
// $router->get('index', 'controller@method');
|
||||
|
19
extend/catcher/command/stubs/seeder.stub
Normal file
19
extend/catcher/command/stubs/seeder.stub
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Seeder;
|
||||
|
||||
class {CLASS} extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run Method.
|
||||
*
|
||||
* Write your database seeder using this method.
|
||||
*
|
||||
* More information on writing seeders is available here:
|
||||
* http://docs.phinx.org/en/latest/seeding.html
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
15
extend/catcher/command/stubs/service.stub
Normal file
15
extend/catcher/command/stubs/service.stub
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace {NAMESPACE};
|
||||
|
||||
use think\Service;
|
||||
|
||||
class {CLASS}Service extends Service
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user