Completed
Push — dev ( 27415e...169927 )
by Darko
09:04
created

RootCategory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A categories() 0 3 1
1
<?php
2
3
namespace App\Models;
4
5
use Watson\Rememberable\Rememberable;
6
use Illuminate\Database\Eloquent\Model;
7
8
class RootCategory extends Model
9
{
10
    use Rememberable;
0 ignored issues
show
introduced by
The trait Watson\Rememberable\Rememberable requires some properties which are not provided by App\Models\RootCategory: $rememberFor, $rememberCacheTag, $rememberCachePrefix, $rememberCacheDriver
Loading history...
11
12
    protected $guarded = [];
13
14
    /**
15
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
16
     */
17
    public function categories(): \Illuminate\Database\Eloquent\Relations\HasMany
18
    {
19
        return $this->hasMany(Category::class, 'root_categories_id');
20
    }
21
}
22