1 | <?php |
||
26 | class LeagueMovie extends Eloquent { |
||
|
|||
27 | |||
28 | /** |
||
29 | * The attributes that are mass assignable. |
||
30 | * |
||
31 | * @type array |
||
32 | */ |
||
33 | protected $fillable = ['league_id', 'movie_id', 'latest_earnings_id', 'price']; |
||
34 | |||
35 | /** |
||
36 | * The league this entry is in |
||
37 | * |
||
38 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
39 | */ |
||
40 | public function league() { |
||
43 | |||
44 | /** |
||
45 | * The movie this entry represents |
||
46 | * |
||
47 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
48 | */ |
||
49 | 1 | public function movie() { |
|
52 | |||
53 | /** |
||
54 | * Teams this movie is owned by |
||
55 | * |
||
56 | * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany |
||
57 | */ |
||
58 | public function teams() { |
||
61 | |||
62 | /** |
||
63 | * The latest earning usable in the league context |
||
64 | * |
||
65 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
66 | */ |
||
67 | 1 | public function latestEarnings() { |
|
70 | |||
71 | /** |
||
72 | * All movie's earnings |
||
73 | * |
||
74 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
75 | */ |
||
76 | public function earnings() { |
||
79 | |||
80 | |||
81 | /** |
||
82 | * Order movies by the release date |
||
83 | * |
||
84 | * @param \Illuminate\Database\Eloquent\Builder $query |
||
85 | */ |
||
86 | 1 | public function scopeOrdered(Illuminate\Database\Eloquent\Builder $query) { |
|
91 | |||
92 | } |
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.