From a48aac714c1ca1a94b27a6523f5df6a9595ee697 Mon Sep 17 00:00:00 2001 From: liutk <961510893@qq.com> Date: Sun, 22 Feb 2026 18:05:19 +0800 Subject: [PATCH] 0.63 --- .../Controllers/Api/AdController copy.php | 22 ------------------- .../Controllers/Api/FriendLinkController.php | 22 +++++++++++++++++++ app/Http/Resources/FriendLinkResource.php | 22 +++++++++++++++++++ routes/api.php | 2 ++ 4 files changed, 46 insertions(+), 22 deletions(-) delete mode 100644 app/Http/Controllers/Api/AdController copy.php create mode 100644 app/Http/Controllers/Api/FriendLinkController.php create mode 100644 app/Http/Resources/FriendLinkResource.php diff --git a/app/Http/Controllers/Api/AdController copy.php b/app/Http/Controllers/Api/AdController copy.php deleted file mode 100644 index ca6542f..0000000 --- a/app/Http/Controllers/Api/AdController copy.php +++ /dev/null @@ -1,22 +0,0 @@ -all(), AdFilter::class)->sort(); - $list = $query->show()->sort()->paginate($this->resolvePerPage('per_page', 20)); - - return $this->json(AdResource::collection($list)); - } -} \ No newline at end of file diff --git a/app/Http/Controllers/Api/FriendLinkController.php b/app/Http/Controllers/Api/FriendLinkController.php new file mode 100644 index 0000000..1c8857e --- /dev/null +++ b/app/Http/Controllers/Api/FriendLinkController.php @@ -0,0 +1,22 @@ +all(), FriendLinkFilter::class)->sort(); + $list = $query->show()->sort()->paginate($this->resolvePerPage('per_page', 20)); + + return $this->json(FriendLinkResource::collection($list)); + } +} \ No newline at end of file diff --git a/app/Http/Resources/FriendLinkResource.php b/app/Http/Resources/FriendLinkResource.php new file mode 100644 index 0000000..6f4f924 --- /dev/null +++ b/app/Http/Resources/FriendLinkResource.php @@ -0,0 +1,22 @@ + $this->title, + 'cover' => $this->cover, + 'link' => $this->link, + ]; + } +} diff --git a/routes/api.php b/routes/api.php index e57de10..9723b39 100644 --- a/routes/api.php +++ b/routes/api.php @@ -31,4 +31,6 @@ Route::middleware('api')->group(function () { Route::get('/project_cates/{project_cate}', [ProjectController::class, 'show']);//服务详情 //业务子类详情 Route::get('/project_children/{child}', [ProjectChildrenController::class, 'show']); + //合作伙伴 + Route::get('/friend_links', [FriendLinkController::class, 'index']); }); \ No newline at end of file