<?php class Vote extends Eloquent { protected $table = "votes"; public function film() { return $this->belongsTo('Film', 'film'); } public function user() { return $this->belongsTo('User', 'user'); } }