for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* LeagueTeam
*
* @property integer $id
* @property integer $league_id
* @property string $name
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
* @method static \Illuminate\Database\Query\Builder|\LeagueTeam whereId($value)
* @method static \Illuminate\Database\Query\Builder|\LeagueTeam whereLeagueId($value)
* @method static \Illuminate\Database\Query\Builder|\LeagueTeam whereName($value)
* @method static \Illuminate\Database\Query\Builder|\LeagueTeam whereCreatedAt($value)
* @method static \Illuminate\Database\Query\Builder|\LeagueTeam whereUpdatedAt($value)
* @property-read \League $league
* @property-read \Illuminate\Database\Eloquent\Collection|\User[] $users
* @property-read \Illuminate\Database\Eloquent\Collection|\LeagueMovie[] $movies
*/
class LeagueTeam extends Eloquent {
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
protected $fillable = ['name'];
* The league this team is in
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
public function league() {
return $this->belongsTo('League');
}
* The users that are in this team
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
public function users() {
return $this->belongsToMany('User')->withTimestamps();
* The movies this team owns
public function movies() {
return $this->belongsToMany('LeagueMovie', 'league_team_movies')->withTimestamps();
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.