Commit 40cff0ce authored by KELBERT Paul's avatar KELBERT Paul
Browse files

Merge branch 'master' of...

Merge branch 'master' of https://gitlab.univ-lorraine.fr/kelbert2u/applicationsbd_chevalier_tondon_kelbert
parents 72302beb cddc56bc
Seance5-6/seance/vendor/*
/Seance5-6/seance/vendor/*
Seance5-6/seance/composer.lock
/Seance5-6/seance/composer.lock
Seance5-6/seance/conf.ini
/Seance5-6/seance/conf.ini
.idea/*
<?php
namespace seance\modele;
class Commentary extends \Illuminate\Database\Eloquent\Model
{
protected $table = 'commentary';
protected $primaryKey = 'id';
public $timestamps = false;
public function commentaires(){
return $this->belongsTo('seance\modele\User', 'id');
}
public function commente(){
return $this->belongsTo('seance\modele\Game', 'id');
}
}
\ No newline at end of file
<?php
namespace seance\modele;
class User extends \Illuminate\Database\Eloquent\Model
{
protected $table = 'user';
protected $primaryKey = 'id';
public $timestamps = false;
public function commentaires(){
return $this->hasMany('seance\modele\Commentary', 'userID');
}
// public function first_appeared_in_game(){
// return $this->belongsTo('seance\modele\Game', 'id');
// }
//
// public function appears_in(){
// return $this->belongsToMany('seance\modele\Game', 'game2character', 'character_id', 'game_id');
// }
//
//
// public function enemies(){
// return $this->belongsToMany('seance\modele\Character', 'enemies', 'char1_id', 'char2_id');
// }
// public function friends(){
// return $this->belongsToMany('seance\modele\Character', 'friends', 'char1_id', 'char2_id');
// }
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment