From f9341d01978c159cb7d529e2f7b307fd53909b8a Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 27 Dec 2022 04:17:05 -0700 Subject: [PATCH] Add AdminHashtag resource --- app/Http/Resources/AdminHashtag.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 app/Http/Resources/AdminHashtag.php diff --git a/app/Http/Resources/AdminHashtag.php b/app/Http/Resources/AdminHashtag.php new file mode 100644 index 000000000..4ca164268 --- /dev/null +++ b/app/Http/Resources/AdminHashtag.php @@ -0,0 +1,29 @@ + $this->id, + 'name' => $this->name, + 'slug' => $this->slug, + 'can_trend' => $this->can_trend === null ? true : (bool) $this->can_trend, + 'can_search' => $this->can_search === null ? true : (bool) $this->can_search, + 'is_nsfw' => (bool) $this->is_nsfw, + 'is_banned' => (bool) $this->is_banned, + 'cached_count' => $this->cached_count ?? 0, + 'created_at' => $this->created_at + ]; + } +}