Completed
Push — master ( f8d0aa...98b092 )
by Manel
02:17
created

Speciality::teachers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
ccs 0
cts 4
cp 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
namespace Scool\EnrollmentMobile\Models;
3
use Illuminate\Database\Eloquent\Model;
4
/**
5
 * Class Speciality.
6
 *
7
 * @package Scool\EnrollmentMobile\Models
8
 */
9
class Speciality extends Model
10
{
11
    /**
12
     * The teachers that belongs to the speciality.
13
     */
14
    public function teachers()
15
    {
16
        return $this->belongsToMany(config('enrollment_mobile.user_class'));
17
    }
18
    /**
19
     * The study submodules that belongs to the speciality.
20
     */
21
    public function study_submodules()
22
    {
23
        return $this->belongsToMany(Submodule::class);
24
    }
25
}