feat: 项目基础框架+配置+Kernel

This commit is contained in:
testadmin
2026-04-29 05:35:00 +08:00
parent 6ce7adcbfb
commit 9a6151fce3
5082 changed files with 437062 additions and 0 deletions
@@ -0,0 +1,48 @@
<?php
/**
* Created by PhpStorm.
* User: YSX
* Date: 2018/12/4
* Time: 19:08
*/
namespace App\Http\Controllers\Agent;
use App\Agent;
use App\Users;
class AgentController extends Controller
{
/**代理商信息
* 可以传用户id也可以传代理商id
*
* @return \Illuminate\Http\JsonResponse
*/
public function info()
{
$agent_id = request('agent_id', 0);
$user_id = request('user_id', Users::getUserId());
if (!$agent_id && !$user_id) {
return $this->error('参数错误');
}
$agent = new Agent();
if ($agent_id) {
$agent = $agent->where('id', $agent_id);
}
if ($user_id) {
$user = Users::find($user_id);
$agent = $agent->where('id', 0);
}
$agent = $agent->first();
return $this->success($agent);
}
}