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

Region::country()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 1
c 1
b 1
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
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