微调
This commit is contained in:
@@ -2,9 +2,7 @@
|
||||
|
||||
namespace App\Admin\Controllers\Activity;
|
||||
|
||||
use App\Admin\Renderable\Activity\Grants;
|
||||
use App\Models\Activity;
|
||||
use App\Models\ActivityGrant;
|
||||
use App\Models\ActivityRule;
|
||||
use App\Models\User;
|
||||
use Encore\Admin\Controllers\HasResourceActions;
|
||||
@@ -37,10 +35,9 @@ class IndexController extends AdminController
|
||||
*/
|
||||
public function index(Content $content)
|
||||
{
|
||||
return $content
|
||||
->title($this->title())
|
||||
->description($this->description['index'] ?? trans('admin.list'))
|
||||
->body($this->grid());
|
||||
return $content->title($this->title())
|
||||
->description($this->description['index'] ?? trans('admin.list'))
|
||||
->body($this->grid());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -51,10 +48,9 @@ class IndexController extends AdminController
|
||||
*/
|
||||
public function edit($id, Content $content)
|
||||
{
|
||||
return $content
|
||||
->title($this->title())
|
||||
->description($this->description['edit'] ?? trans('admin.edit'))
|
||||
->body($this->form($id)->edit($id));
|
||||
return $content->title($this->title())
|
||||
->description($this->description['edit'] ?? trans('admin.edit'))
|
||||
->body($this->form($id)->edit($id));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,10 +60,9 @@ class IndexController extends AdminController
|
||||
*/
|
||||
public function create(Content $content)
|
||||
{
|
||||
return $content
|
||||
->title($this->title())
|
||||
->description($this->description['create'] ?? trans('admin.create'))
|
||||
->body($this->form());
|
||||
return $content->title($this->title())
|
||||
->description($this->description['create'] ?? trans('admin.create'))
|
||||
->body($this->form());
|
||||
}
|
||||
|
||||
protected function grid()
|
||||
@@ -83,11 +78,6 @@ class IndexController extends AdminController
|
||||
$filter->column(1 / 2, function ($filter) {
|
||||
$filter->equal('status', '状态')->select(Activity::STATUS);
|
||||
$filter->equal('type', '类型')->select(Activity::TYPES);
|
||||
|
||||
$users = User::whereHas('identity', function ($query) {
|
||||
$query->where('identity_id', 1);
|
||||
})->get()->pluck('nickname', 'id');
|
||||
|
||||
});
|
||||
|
||||
$filter->column(1 / 2, function ($filter) {
|
||||
@@ -257,9 +247,11 @@ class IndexController extends AdminController
|
||||
$users = [];
|
||||
foreach ($form->grants['user_id'] as $key => $user_id) {
|
||||
if ($user_id) {
|
||||
$form->model()->grants()->updateOrCreate([
|
||||
'user_id' => $user_id,
|
||||
]);
|
||||
$form->model()
|
||||
->grants()
|
||||
->updateOrCreate([
|
||||
'user_id' => $user_id,
|
||||
]);
|
||||
$users[] = $user_id;
|
||||
}
|
||||
}
|
||||
@@ -267,9 +259,11 @@ class IndexController extends AdminController
|
||||
$users = [];
|
||||
foreach ($form->verifications['user_id'] as $key => $user_id) {
|
||||
if ($user_id) {
|
||||
$form->model()->verifications()->updateOrCreate([
|
||||
'user_id' => $user_id,
|
||||
]);
|
||||
$form->model()
|
||||
->verifications()
|
||||
->updateOrCreate([
|
||||
'user_id' => $user_id,
|
||||
]);
|
||||
$users[] = $user_id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@ class TestController
|
||||
|
||||
use ApiResponse;
|
||||
|
||||
public $baseUrl;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->baseUrl = env('BASE_URL');
|
||||
@@ -42,6 +44,8 @@ class TestController
|
||||
* Notes: 发券
|
||||
* @Author: 玄尘
|
||||
* @Date : 2020/6/29 13:57
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return mixed
|
||||
*/
|
||||
public function grant(Request $request)
|
||||
{
|
||||
|
||||
12
composer.lock
generated
12
composer.lock
generated
@@ -5798,16 +5798,16 @@
|
||||
},
|
||||
{
|
||||
"name": "xuanchen/unionpay",
|
||||
"version": "2.7",
|
||||
"version": "2.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/xuanchen120/unionpay.git",
|
||||
"reference": "877342101be87fb82f92681578953733bf2f93f7"
|
||||
"reference": "985072f96993f3fc1d0c2e7fb8cfd5e457d65741"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/xuanchen120/unionpay/zipball/877342101be87fb82f92681578953733bf2f93f7",
|
||||
"reference": "877342101be87fb82f92681578953733bf2f93f7",
|
||||
"url": "https://api.github.com/repos/xuanchen120/unionpay/zipball/985072f96993f3fc1d0c2e7fb8cfd5e457d65741",
|
||||
"reference": "985072f96993f3fc1d0c2e7fb8cfd5e457d65741",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@@ -5847,9 +5847,9 @@
|
||||
"description": "第三方银联对接",
|
||||
"support": {
|
||||
"issues": "https://github.com/xuanchen120/unionpay/issues",
|
||||
"source": "https://github.com/xuanchen120/unionpay/tree/2.7"
|
||||
"source": "https://github.com/xuanchen120/unionpay/tree/2.9"
|
||||
},
|
||||
"time": "2021-01-31T06:20:57+00:00"
|
||||
"time": "2021-02-18T09:50:47+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
//是否调试
|
||||
'debug' => false,
|
||||
//环境变量
|
||||
'this_type' => 'test',
|
||||
//添加日志
|
||||
|
||||
Reference in New Issue
Block a user