1 | <?php |
||
17 | class Tag extends Model |
||
18 | { |
||
19 | /** |
||
20 | * The attributes that should be casted to native types. |
||
21 | * |
||
22 | * @var string[] |
||
23 | */ |
||
24 | protected $casts = [ |
||
25 | 'id' => 'int', |
||
26 | 'name' => 'string', |
||
27 | ]; |
||
28 | |||
29 | /** |
||
30 | * The fillable properties. |
||
31 | * |
||
32 | * @var string[] |
||
33 | */ |
||
34 | protected $fillable = ['name']; |
||
35 | |||
36 | /** |
||
37 | * Overrides the models boot method. |
||
38 | */ |
||
39 | public static function boot() |
||
47 | |||
48 | /** |
||
49 | * Tags can have many projects. |
||
50 | * |
||
51 | * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany |
||
52 | */ |
||
53 | public function projects() |
||
57 | } |
||
58 |