Test Failed
Push — main ( 92d586...908f29 )
by Davide
12:57
created

Region   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 6
c 1
b 1
f 0
dl 0
loc 26
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A country() 0 3 1
1
<?php
2
3
namespace App\Models;
4
5
use Illuminate\Database\Eloquent\Factories\HasFactory;
6
use Illuminate\Database\Eloquent\Model;
7
use Spatie\Translatable\HasTranslations;
8
9
class Region extends Model
10
{
11
    use HasFactory;
12
    use HasTranslations;
13
14
    /**
15
     * The attributes that aren't mass assignable.
16
     *
17
     * @var array
18
     */
19
    protected $guarded = [];
20
21
    /**
22
     * The attributes that are translatable.
23
     *
24
     * @var array
25
     */
26
    public $translatable = ['name'];
27
28
29
    /**
30
     * Returns the country of the region.
31
     */
32
    public function country()
33
    {
34
        return $this->belongsTo(Country::class);
35
    }
36
37
38
}
39