|
@@ -32,8 +32,14 @@ class CollectionController extends Controller
|
|
|
{
|
|
|
|
|
|
|
|
|
-
|
|
|
- $tag = SitePageTag::where('slug', $slug)->first();
|
|
|
+
|
|
|
+ if (is_numeric($slug)) {
|
|
|
+ $tag = SitePageTag::find($slug);
|
|
|
+ } else {
|
|
|
+
|
|
|
+ $tag = SitePageTag::where('slug', $slug)->first();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
if (!$tag) {
|
|
|
return response()->json(['message' => '标签未找到'], 404);
|