1 | <?php |
||
17 | class Humanresource extends EloquentModel |
||
18 | { |
||
19 | /** |
||
20 | * The attributes that are mass assignable. |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $fillable = ['name', 'capacity', 'calendar_link']; |
||
25 | |||
26 | protected $guarded = ['id', 'slug']; |
||
27 | |||
28 | /** |
||
29 | * Has many human resources. |
||
30 | * |
||
31 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
32 | */ |
||
33 | 1 | public function business() |
|
37 | |||
38 | /** |
||
39 | * Set Calendar link. |
||
40 | * |
||
41 | * @param string $calendar_link |
||
42 | */ |
||
43 | public function setCalendarLinkAttribute($calendar_link) |
||
47 | |||
48 | /** |
||
49 | * TODO: Check slug setting can be moved to a more proper place. |
||
50 | * |
||
51 | * Save the model to the database. |
||
52 | * |
||
53 | * @param array $options |
||
54 | * |
||
55 | * @return bool |
||
56 | */ |
||
57 | 4 | public function save(array $options = []) |
|
63 | } |
||
64 |