We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0935daf commit 876ce14Copy full SHA for 876ce14
laravel/app/Http/Controllers/Api/ApiExcelController.php
@@ -51,7 +51,14 @@ public function __construct(Request $request)
51
*/
52
public function index()
53
{
54
- $list = ApiExcel::with('apiParam')->orderBy('id', 'desc')->paginate($this->perPage);
+ $user_id = auth('api')->user()['id'];
55
+
56
+ // 查询对应用户的上传数据
57
+ $where = [];
58
+ if ($user_id != 1) {
59
+ $where = ['uid' => $user_id];
60
+ }
61
+ $list = ApiExcel::with('apiParam')->where($where)->orderBy('id', 'desc')->paginate($this->perPage);
62
63
$appUrl = env('APP_URL') ?? '';
64
$collect = collect(['appUrl' => $appUrl]);
0 commit comments