Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

test

class Event extends Model {

    protected $table = 'events';
    public $timestamps = false;

    public function participants()
    {
        return $this->hasMany('AppParticipant', 'IDEvent', 'ID');
    }

    public function owner()
    {
        return $this->hasOne('AppUser', 'ID', 'IDOwner');
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #test
ADD COMMENT
Topic
Name
7+8 =