去掉控制器方法的后缀名
This commit is contained in:
@@ -22,7 +22,7 @@ class AuthController extends Controller
|
||||
/**
|
||||
* 二次验证
|
||||
*/
|
||||
public function totpAction()
|
||||
public function totp()
|
||||
{
|
||||
// 时间验证密钥
|
||||
$t = new Totp();
|
||||
@@ -58,7 +58,7 @@ class AuthController extends Controller
|
||||
/**
|
||||
* 表单登录
|
||||
*/
|
||||
public function loginAction()
|
||||
public function login()
|
||||
{
|
||||
$gets = Request::all();
|
||||
|
||||
@@ -151,7 +151,7 @@ class AuthController extends Controller
|
||||
/**
|
||||
* 验证码
|
||||
*/
|
||||
public function captchaAction()
|
||||
public function captcha()
|
||||
{
|
||||
Captcha::make();
|
||||
}
|
||||
@@ -159,7 +159,7 @@ class AuthController extends Controller
|
||||
/**
|
||||
* 二维码登录
|
||||
*/
|
||||
public function qrcodeAction()
|
||||
public function qrcode()
|
||||
{
|
||||
return $this->display([
|
||||
]);
|
||||
@@ -168,7 +168,7 @@ class AuthController extends Controller
|
||||
/**
|
||||
* 注销
|
||||
*/
|
||||
public function logoutAction()
|
||||
public function logout()
|
||||
{
|
||||
Auth::logout();
|
||||
Session::flush();
|
||||
|
||||
@@ -16,7 +16,7 @@ class DepartmentController extends DefaultController
|
||||
{
|
||||
public $permission = ['dialog'];
|
||||
|
||||
public function indexAction()
|
||||
public function index()
|
||||
{
|
||||
$display = $this->access;
|
||||
|
||||
@@ -82,7 +82,7 @@ class DepartmentController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
public function createAction()
|
||||
public function create()
|
||||
{
|
||||
$id = (int)Request::get('id');
|
||||
$form = Form::make(['code' => 'department', 'id' => $id]);
|
||||
@@ -91,12 +91,12 @@ class DepartmentController extends DefaultController
|
||||
], 'create');
|
||||
}
|
||||
|
||||
public function editAction()
|
||||
public function edit()
|
||||
{
|
||||
return $this->createAction();
|
||||
return $this->create();
|
||||
}
|
||||
|
||||
public function dialogAction()
|
||||
public function dialog()
|
||||
{
|
||||
$search = search_form([], [
|
||||
['text','department.name','名称'],
|
||||
@@ -137,7 +137,7 @@ class DepartmentController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
public function deleteAction()
|
||||
public function delete()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
$id = Request::get('id');
|
||||
|
||||
@@ -16,7 +16,7 @@ class GroupController extends DefaultController
|
||||
{
|
||||
public $permission = ['dialog'];
|
||||
|
||||
public function indexAction()
|
||||
public function index()
|
||||
{
|
||||
$header = Grid::header([
|
||||
'code' => 'user_group',
|
||||
@@ -67,7 +67,7 @@ class GroupController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
public function createAction()
|
||||
public function create()
|
||||
{
|
||||
$id = (int)Request::get('id');
|
||||
$form = Form::make(['code' => 'user_group', 'id' => $id]);
|
||||
@@ -76,12 +76,12 @@ class GroupController extends DefaultController
|
||||
], 'create');
|
||||
}
|
||||
|
||||
public function editAction()
|
||||
public function edit()
|
||||
{
|
||||
return $this->createAction();
|
||||
return $this->create();
|
||||
}
|
||||
|
||||
public function deleteAction()
|
||||
public function delete()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
$ids = Request::get('id');
|
||||
|
||||
@@ -19,7 +19,7 @@ class MessageController extends Controller
|
||||
/**
|
||||
* 消息列表
|
||||
*/
|
||||
public function indexAction()
|
||||
public function index()
|
||||
{
|
||||
$header = Grid::header([
|
||||
'code' => 'user_message',
|
||||
@@ -84,7 +84,7 @@ class MessageController extends Controller
|
||||
/*
|
||||
* 消息状态标记
|
||||
*/
|
||||
public function statusAction()
|
||||
public function status()
|
||||
{
|
||||
$id = (array)Request::get('id');
|
||||
$type = Request::get('type');
|
||||
@@ -107,7 +107,7 @@ class MessageController extends Controller
|
||||
/**
|
||||
* 新建提醒
|
||||
*/
|
||||
public function createAction()
|
||||
public function create()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
$gets = Request::all();
|
||||
@@ -127,7 +127,7 @@ class MessageController extends Controller
|
||||
/**
|
||||
* 显示提醒
|
||||
*/
|
||||
public function showAction()
|
||||
public function show()
|
||||
{
|
||||
$id = Request::get('id');
|
||||
$row = DB::table('user_message')->find($id);
|
||||
@@ -144,7 +144,7 @@ class MessageController extends Controller
|
||||
/**
|
||||
* 未读提醒
|
||||
*/
|
||||
public function countAction()
|
||||
public function count()
|
||||
{
|
||||
$count = DB::table('user_message')
|
||||
->where('read_id', Auth::id())
|
||||
@@ -153,7 +153,7 @@ class MessageController extends Controller
|
||||
return $count;
|
||||
}
|
||||
|
||||
public function deleteAction()
|
||||
public function delete()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
$ids = Request::get('id');
|
||||
|
||||
@@ -16,7 +16,7 @@ class PositionController extends DefaultController
|
||||
{
|
||||
public $permission = ['dialog'];
|
||||
|
||||
public function indexAction()
|
||||
public function index()
|
||||
{
|
||||
$header = Grid::header([
|
||||
'code' => 'user_position',
|
||||
@@ -68,7 +68,7 @@ class PositionController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
public function createAction()
|
||||
public function create()
|
||||
{
|
||||
$id = (int)Request::get('id');
|
||||
$form = Form::make(['code' => 'user_position', 'id' => $id]);
|
||||
@@ -77,12 +77,12 @@ class PositionController extends DefaultController
|
||||
], 'create');
|
||||
}
|
||||
|
||||
public function editAction()
|
||||
public function edit()
|
||||
{
|
||||
return $this->createAction();
|
||||
return $this->create();
|
||||
}
|
||||
|
||||
public function dialogAction()
|
||||
public function dialog()
|
||||
{
|
||||
$search = search_form([], [
|
||||
['text','user_position.name','名称'],
|
||||
@@ -104,7 +104,7 @@ class PositionController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
public function deleteAction()
|
||||
public function delete()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
$ids = Request::get('id');
|
||||
|
||||
@@ -25,7 +25,7 @@ class ProfileController extends DefaultController
|
||||
public $permission = ['index', 'password', 'avatar', 'secret', 'getUser'];
|
||||
|
||||
// 资料修改
|
||||
public function indexAction()
|
||||
public function index()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
$gets = Request::all();
|
||||
@@ -57,7 +57,7 @@ class ProfileController extends DefaultController
|
||||
/**
|
||||
* 获取用户信息
|
||||
*/
|
||||
public function getUserAction()
|
||||
public function getUser()
|
||||
{
|
||||
$user['avatar'] = avatar(auth()->user()->avatar);
|
||||
$user['name'] = auth()->user()->name;
|
||||
@@ -67,7 +67,7 @@ class ProfileController extends DefaultController
|
||||
/**
|
||||
* 更新安全密钥
|
||||
*/
|
||||
public function secretAction()
|
||||
public function secret()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
$id = Request::get('id');
|
||||
@@ -80,7 +80,7 @@ class ProfileController extends DefaultController
|
||||
}
|
||||
|
||||
// 修改密码
|
||||
public function passwordAction()
|
||||
public function password()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
$gets = Request::all();
|
||||
@@ -122,7 +122,7 @@ class ProfileController extends DefaultController
|
||||
}
|
||||
|
||||
// 用户头像
|
||||
public function avatarAction()
|
||||
public function avatar()
|
||||
{
|
||||
$gets = Request::all();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ class RegionController extends DefaultController
|
||||
/**
|
||||
* 市列表
|
||||
*/
|
||||
public function indexAction()
|
||||
public function index()
|
||||
{
|
||||
$id = (int) Request::get('id', '0');
|
||||
$parent_id = (int) Request::get('parent_id', '0');
|
||||
|
||||
@@ -25,7 +25,7 @@ class RoleController extends DefaultController
|
||||
{
|
||||
public $permission = ['dialog', 'permission'];
|
||||
|
||||
public function indexAction()
|
||||
public function index()
|
||||
{
|
||||
$display = $this->access;
|
||||
|
||||
@@ -96,7 +96,7 @@ class RoleController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
public function configAction()
|
||||
public function config()
|
||||
{
|
||||
$gets = Request::all();
|
||||
|
||||
@@ -168,7 +168,7 @@ class RoleController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
public function createAction()
|
||||
public function create()
|
||||
{
|
||||
$id = (int)Request::get('id');
|
||||
$form = Form::make(['code' => 'role', 'id' => $id]);
|
||||
@@ -177,12 +177,12 @@ class RoleController extends DefaultController
|
||||
], 'create');
|
||||
}
|
||||
|
||||
public function editAction()
|
||||
public function edit()
|
||||
{
|
||||
return $this->createAction();
|
||||
return $this->create();
|
||||
}
|
||||
|
||||
public function dialogAction()
|
||||
public function dialog()
|
||||
{
|
||||
$search = search_form([], [
|
||||
['text','role.name','名称'],
|
||||
@@ -215,7 +215,7 @@ class RoleController extends DefaultController
|
||||
/**
|
||||
* 角色设置
|
||||
*/
|
||||
public function permissionAction()
|
||||
public function permission()
|
||||
{
|
||||
$gets = Request::all();
|
||||
if (Request::method() == 'POST') {
|
||||
@@ -247,7 +247,7 @@ class RoleController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
public function deleteAction()
|
||||
public function delete()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class TokenController extends Controller
|
||||
/**
|
||||
* APP登录
|
||||
*/
|
||||
public function loginAction()
|
||||
public function login()
|
||||
{
|
||||
if (Request::isJson()) {
|
||||
$gets = json_decode(Request::getContent(), true);
|
||||
@@ -84,7 +84,7 @@ class TokenController extends Controller
|
||||
return ['message'=>'账户或密码错误。', 'success'=>false];
|
||||
}
|
||||
|
||||
public function logoutAction()
|
||||
public function logout()
|
||||
{
|
||||
return '注销完成。';
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class UserController extends DefaultController
|
||||
{
|
||||
public $permission = ['dialog'];
|
||||
|
||||
public function indexAction()
|
||||
public function index()
|
||||
{
|
||||
$header = Grid::header([
|
||||
'code' => 'user',
|
||||
@@ -98,7 +98,7 @@ class UserController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
public function showAction()
|
||||
public function show()
|
||||
{
|
||||
$id = (int)Request::get('id');
|
||||
$form = Form::make(['code' => 'user', 'id' => $id, 'action' => 'show']);
|
||||
@@ -111,7 +111,7 @@ class UserController extends DefaultController
|
||||
], 'create');
|
||||
}
|
||||
|
||||
public function createAction()
|
||||
public function create()
|
||||
{
|
||||
$id = (int)Request::get('id');
|
||||
$form = Form::make(['code' => 'user', 'id' => $id]);
|
||||
@@ -120,12 +120,12 @@ class UserController extends DefaultController
|
||||
], 'create');
|
||||
}
|
||||
|
||||
public function editAction()
|
||||
public function edit()
|
||||
{
|
||||
return $this->createAction();
|
||||
return $this->create();
|
||||
}
|
||||
|
||||
public function dialogAction()
|
||||
public function dialog()
|
||||
{
|
||||
$group_id = Request::get('group_id', 1);
|
||||
$header = Grid::header([
|
||||
@@ -172,7 +172,7 @@ class UserController extends DefaultController
|
||||
}
|
||||
|
||||
// 数据导入
|
||||
public function importAction()
|
||||
public function import()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
return Form::import([
|
||||
@@ -185,7 +185,7 @@ class UserController extends DefaultController
|
||||
return $this->render(['tips' => $tips], 'layouts.import');
|
||||
}
|
||||
|
||||
public function deleteAction()
|
||||
public function delete()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
$ids = Request::get('id');
|
||||
|
||||
@@ -8,7 +8,7 @@ class WidgetController extends DefaultController
|
||||
public $permission = ['birthday'];
|
||||
|
||||
// 生日提醒
|
||||
public function birthdayAction()
|
||||
public function birthday()
|
||||
{
|
||||
$rows = DB::table('user')->whereRaw("concat(year(getdata()), DATE_FORMAT(birthday,'-%m-%d')) BETWEEN DATE_FORMAT(getdate(),'%Y-%m-%d') AND DATE_FORMAT(DATE_ADD(getdate(), interval 30 day),'%Y-%m-%d')")->get();
|
||||
return $this->render(array(
|
||||
|
||||
@@ -35,11 +35,11 @@
|
||||
|
||||
// 标记已读
|
||||
action.read = function() {
|
||||
statusAction('read');
|
||||
status('read');
|
||||
};
|
||||
// 标记未读
|
||||
action.unread = function() {
|
||||
statusAction('unread');
|
||||
status('unread');
|
||||
};
|
||||
|
||||
var grid = new agGridOptions();
|
||||
|
||||
Reference in New Issue
Block a user