Skip to content

Commit 4e2a007

Browse files
committed
style(service): remove full specified path for models in service
1 parent 6b53386 commit 4e2a007

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

app/Services/ArticleService.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
namespace App\Services;
66

77
use App\Models\Article;
8+
use App\Models\Category;
9+
use App\Models\Tag;
810
use Illuminate\Database\Eloquent\Builder;
911
use Illuminate\Pagination\LengthAwarePaginator;
1012

@@ -127,20 +129,20 @@ private function applyFilters(Builder $query, array $params): void
127129
/**
128130
* Get all categories
129131
*
130-
* @return \Illuminate\Database\Eloquent\Collection<int, \App\Models\Category>
132+
* @return \Illuminate\Database\Eloquent\Collection<int, Category>
131133
*/
132134
public function getAllCategories()
133135
{
134-
return \App\Models\Category::query()->get(['id', 'name', 'slug']);
136+
return Category::query()->get(['id', 'name', 'slug']);
135137
}
136138

137139
/**
138140
* Get all tags
139141
*
140-
* @return \Illuminate\Database\Eloquent\Collection<int, \App\Models\Tag>
142+
* @return \Illuminate\Database\Eloquent\Collection<int, Tag>
141143
*/
142144
public function getAllTags()
143145
{
144-
return \App\Models\Tag::query()->get(['id', 'name', 'slug']);
146+
return Tag::query()->get(['id', 'name', 'slug']);
145147
}
146148
}

0 commit comments

Comments
 (0)