Company.php 580 Bytes
Newer Older
KELBERT Paul's avatar
KELBERT Paul committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php

namespace seance\modele;

class Company extends \Illuminate\Database\Eloquent\Model
{

    protected $table = 'company';
    protected $primaryKey = 'id';
    public $timestamps = false;


    public function developers(){
        return $this->belongsToMany('seance\modele\Game', 'game_developers', 'comp_id', 'game_id');
    }

    public function publishers(){
        return $this->belongsToMany('seance\modele\Game', 'game_publishers', 'comp_id', 'game_id');
    }

    public function producer(){
        return $this->hasMany('seance\modele\Platform', 'id');
    }
}