PHP Trait Mpociot\Teamwork\Traits\TeamworkTeamTrait

Datei anzeigen Open project: mpociot/teamwork

Public Methods

Method Description
hasUser ( Model $user ) : boolean Helper function to determine if a user is part of this team
invites ( ) : mixed One-to-Many relation with the invite model
owner ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany Has-One relation with the user model.
users ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany Many-to-Many relations with the user model.

Method Details

hasUser() public method

Helper function to determine if a user is part of this team
public hasUser ( Model $user ) : boolean
$user Illuminate\Database\Eloquent\Model
return boolean

invites() public method

One-to-Many relation with the invite model
public invites ( ) : mixed
return mixed

owner() public method

This indicates the owner of the team
public owner ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
return Illuminate\Database\Eloquent\Relations\BelongsToMany

users() public method

Many-to-Many relations with the user model.
public users ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
return Illuminate\Database\Eloquent\Relations\BelongsToMany