Total Complexity | 7 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class Source extends Model |
||
9 | { |
||
10 | use SoftDeletes; |
||
11 | |||
12 | protected $connection = 'tenant'; |
||
13 | |||
14 | const SOURCE_KEY_MAXLENGTH = 8; |
||
15 | |||
16 | protected $fillable = [ |
||
17 | 'name', |
||
18 | 'recruitment_id', |
||
19 | ]; |
||
20 | |||
21 | /** |
||
22 | * Get the route key for the model. |
||
23 | * |
||
24 | * @return string |
||
25 | */ |
||
26 | public function getRouteKeyName() |
||
29 | } |
||
30 | |||
31 | public function recruitment() |
||
32 | { |
||
33 | return $this->belongsTo(Recruitment::class); |
||
34 | } |
||
35 | |||
36 | protected function generateUniqueKey() |
||
37 | { |
||
38 | $this->key = $this->getUniqueKey(); |
||
39 | } |
||
40 | |||
41 | protected static function getUniqueKey() |
||
49 | } |
||
50 | |||
51 | public function save(array $options = []) |
||
57 | } |
||
58 | } |
||
59 |