1 | <?php |
||
26 | class Movie extends Eloquent { |
||
|
|||
27 | |||
28 | /** |
||
29 | * Fields to format as dates |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $dates = ['release']; |
||
33 | |||
34 | /** |
||
35 | * Allow filling of these fields |
||
36 | * @var array |
||
37 | */ |
||
38 | protected $fillable = ['name', 'boxmojo_id', 'boxoffice_id', 'release']; |
||
39 | |||
40 | /** |
||
41 | * All movie's earnings |
||
42 | * |
||
43 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
44 | */ |
||
45 | public function earnings() { |
||
48 | |||
49 | /** |
||
50 | * Movie's latest earnings |
||
51 | * |
||
52 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
53 | */ |
||
54 | public function latestEarnings() { |
||
57 | |||
58 | /** |
||
59 | * Leagues this movie is used in |
||
60 | * |
||
61 | * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany |
||
62 | */ |
||
63 | public function leagues() { |
||
66 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.