1 | <?php |
||
16 | class ServiceType extends Model |
||
17 | { |
||
18 | /** |
||
19 | * The attributes that are mass assignable. |
||
20 | * |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $fillable = ['name', 'description', 'business_id']; |
||
24 | |||
25 | /** |
||
26 | * The attributes that aren't mass assignable. |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $guarded = ['id', 'slug']; |
||
31 | |||
32 | /** |
||
33 | * Has many services. |
||
34 | * |
||
35 | * @return Illuminate\Database\Query Relationship |
||
36 | */ |
||
37 | 1 | public function services() |
|
41 | |||
42 | /** |
||
43 | * Belongs to Business. |
||
44 | * |
||
45 | * @return Illuminate\Database\Query Relationship |
||
46 | */ |
||
47 | 1 | public function business() |
|
51 | |||
52 | /** |
||
53 | * TODO: Check slug setting can be moved to a more proper place. |
||
54 | * |
||
55 | * Save the model to the database. |
||
56 | * |
||
57 | * @param array $options |
||
58 | * |
||
59 | * @return bool |
||
60 | */ |
||
61 | 1 | public function save(array $options = []) |
|
67 | } |
||
68 |