Completed
Push — master ( 58b661...a53837 )
by Francesco
09:22
created

Section::questions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
declare(strict_types = 1);
3
4
namespace App\Models;
5
6
use App\Models\Traits\EloquentGetTableName;
7
use Illuminate\Database\Eloquent\Model;
8
use Illuminate\Database\Eloquent\Relations\HasMany;
9
use Illuminate\Database\Eloquent\SoftDeletes;
10
11
class Section extends Model
12
{
13
14
    use SoftDeletes;
15
    use EloquentGetTableName;
16
17
    /**
18
     * The attributes that should be mutated to dates.
19
     *
20
     * @var array
21
     */
22
    protected $dates = ["deleted_at"];
23
24
    /**
25
     * Get the questions of this section
26
     * @return HasMany
27
     */
28
    public function questions() : HasMany
29
    {
30
        return $this->hasMany("App\Models\Question");
31
    }
32
33
}
34