1class Something extends Eloquent {
2
3 protected $table = 'something';
4
5 public function users()
6 {
7 return $this->hasMany('User', 'id_something');
8 }
9}
10
11class User extends Eloquent implements UserInterface, RemindableInterface {
12
13 use UserTrait, RemindableTrait;
14
15 protected $table = 'something_users';
16
17 protected $hidden = array('password', 'remember_token');
18
19 public function something()
20 {
21 return $this->belongsTo('Something', 'id_something');
22 }
23}