Created
May 30, 2014 14:03
-
-
Save LeShadow/b3ec33414981144d4d22 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Schedule extends Eloquent { | |
/** | |
* The database table used by the model. | |
* | |
* @var string | |
*/ | |
protected $table = 'schedule'; | |
/** | |
* The attributes excluded from the model's JSON form. | |
* | |
* @var array | |
*/ | |
protected $hidden = array(); | |
protected $filleable = array('datetime','team_a_id','team_b_id','fieldtype'); | |
protected $guarded = array(); | |
public static $rules = array( | |
); | |
public $autoPurgeRedundantAttributes = true; | |
/** | |
* Get the unique identifier for the user. | |
* | |
* @return mixed | |
*/ | |
public function getScheduleIdentifier() | |
{ | |
return $this->getKey(); | |
} | |
public function getRulesAttribute() | |
{ | |
return self::$rules; | |
} | |
public function getTeamA() | |
{ | |
return $this->hasOne('team', 'team_a_id'); | |
} | |
public function getTeamB() | |
{ | |
return $this->hasOne('team', 'team_b_id'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment