Completed
Pull Request — master (#34)
by Fèvre
18:57 queued 15:50
created

DiscussCategoryRepository::sidebar()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace Xetaravel\Models\Repositories;
3
4
use Illuminate\Support\Collection;
5
use Xetaravel\Models\DiscussCategory;
6
7
class DiscussCategoryRepository
8
{
9
    /**
10
     * Find the categories for the sidebar.
11
     *
12
     * @return \Illuminate\Database\Eloquent\Collection|static[]
13
     */
14
    public static function sidebar(): Collection
15
    {
16
        return DiscussCategory::take(config('xetaravel.discuss.categories_sidebar'))->orderBy('title', 'asc')->get();
17
    }
18
}
19