Skip to content
Snippets Groups Projects
Commit 12bae454 authored by KELBERT Paul's avatar KELBERT Paul
Browse files

application master

parent b6927824
No related branches found
No related tags found
No related merge requests found
Showing
with 949 additions and 0 deletions
<?php
require 'vendor/autoload.php';
use seance\reponse\CQuestion1;
$q = new CQuestion1();
\ No newline at end of file
<?php
require 'vendor/autoload.php';
use seance\reponse\CQuestion2;
new CQuestion2();
\ No newline at end of file
<?php
require 'vendor/autoload.php';
use seance\reponse\CQuestion3;
new CQuestion3();
\ No newline at end of file
<?php
require 'vendor/autoload.php';
use seance\reponse\CQuestion4;
new CQuestion4();
\ No newline at end of file
<?php
require 'vendor/autoload.php';
use seance\reponse\CQuestion5;
new CQuestion5();
\ No newline at end of file
<?php
require 'vendor/autoload.php';
use seance\reponse\CQuestion6;
new CQuestion6();
\ No newline at end of file
<?php
require 'vendor/autoload.php';
use seance\reponse\CQuestion7;
new CQuestion7();
\ No newline at end of file
<?php
require 'vendor/autoload.php';
use seance\reponse\CQuestion8;
new CQuestion8();
\ No newline at end of file
<?php
require 'vendor/autoload.php';
use seance\reponse\CQuestion9;
new CQuestion9();
\ No newline at end of file
{
"require":{
"illuminate/database": "5.5.*",
"php": ">=7.3"
},
"autoload":{
"psr-4": {
"seance\\" : "src/"
}
}
}
This diff is collapsed.
driver=mysql
username=root
password=
host=localhost
database=applibd
\ No newline at end of file
<?php
require 'vendor/autoload.php';
use seance\modele\Game;
echo "<a href='Question1.php'>question 1 -- afficher (name, deck) les personnages du jeu 12342</a><br>";
echo "<a href='Question2.php'>question 2 -- les personnages des jeux dont le nom (du jeu) débute par Mario</a><br>";
echo "<a href='Question3.php'>question 3 -- les jeux développés par une compagnie dont le nom contient \"sony\"</a><br>";
echo "<a href='Question4.php'>question 4 -- le rating initial (indiquer le rating board) des jeux dont le nom contient mario</a><br>";
echo "<a href='Question5.php'>question 5 -- les jeux dont le nom débute par mario et ayant plus de 3 personnages</a><br>";
echo "<a href='Question6.php'>question 6 -- les jeux dont le nom débute par mario et dont le rating initial contient \"3+\"</a><br>";
echo "<a href='Question7.php'>question 7 -- les jeux dont le nom début par mario, publiés par une compagnie dont le nom contient \"inc.\" et dont le rating initial contient \"3+\"</a><br>";
echo "<a href='Question8.php'>question 8 -- les jeux dont le nom début par mario, publiés par une compagnie dont le nom contient \"inc.\" et dont le rating initial contient \"3+\" et ayant recu un avis de la part du rating board nommé \"CERO\"</a><br>";
echo "<a href='Question9.php'>question 9 -- ajouter un nouveau genre de jeu, et l'associer au jeux 12, 59, 345</a><br>";
<?php
namespace seance\modele;
class Character extends \Illuminate\Database\Eloquent\Model
{
protected $table = 'character';
protected $primaryKey = 'id';
public $timestamps = false;
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
<?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');
}
}
\ No newline at end of file
<?php
namespace seance\modele;
class Game extends \Illuminate\Database\Eloquent\Model
{
protected $table = 'game';
protected $primaryKey = 'id';
public $timestamps = false;
public function appears_in(){
return $this->belongsToMany('seance\modele\Character', 'game2character', 'game_id', 'character_id');
}
public function first_appeared_in_game(){
return $this->hasMany('seance\modele\Character', 'id');
}
public function simular_games(){
return $this->belongsToMany('seance\modele\Game', 'similar_games', 'game1_id', 'game2_id');
}
public function developers(){
return $this->belongsToMany('seance\modele\Company', 'game_developers', 'game_id', 'comp_id');
}
public function publishers(){
return $this->belongsToMany('seance\modele\Company', 'game_publishers', 'game_id', 'comp_id');
}
public function original_game_ratings(){
return $this->belongsToMany('seance\modele\Game_Rating', "game2rating", 'game_id', 'rating_id');
}
public function game2genre(){
return $this->belongsToMany('seance\modele\Genre', 'game2genre', 'game_id', 'genre_id');
}
public function game2theme(){
return $this->belongsToMany('seance\modele\Theme', 'game2theme', 'game_id', 'theme_id');
}
public function game2platform(){
return $this->belongsToMany('seance\modele\Platform', 'game2platform', 'game_id', 'platform_id');
}
}
\ No newline at end of file
<?php
namespace seance\modele;
class Game_Rating extends \Illuminate\Database\Eloquent\Model
{
protected $table = 'game_rating';
protected $primaryKey = 'id';
public $timestamps = false;
protected $fillable = [
"name",
"rating_board_id"
];
public function original_game_ratings(){
return $this->belongsToMany('seance\modele\Game', "game2rating", 'rating_id', 'game_id');
}
public function gameR2ratB(){
return $this->belongsTo('seance\modele\Rating_Board', 'id');
}
}
\ No newline at end of file
<?php
namespace seance\modele;
class Genre extends \Illuminate\Database\Eloquent\Model
{
protected $table = 'genre';
protected $primaryKey = 'id';
public $timestamps = false;
public function game2genre(){
return $this->belongsToMany('seance\modele\Game', 'game2genre', 'genre_id', 'game_id');
}
}
\ No newline at end of file
<?php
namespace seance\modele;
class Platform extends \Illuminate\Database\Eloquent\Model
{
protected $table = 'platform';
protected $primaryKey = 'id';
public $timestamps = false;
public function producer(){
return $this->belongsTo('seance\modele\Company', 'id');
}
public function game2platform(){
return $this->belongsToMany('seance\modele\Game', 'game2platform', 'platform_id', 'game_id');
}
}
\ No newline at end of file
<?php
namespace seance\modele;
class Rating_Board extends \Illuminate\Database\Eloquent\Model
{
protected $table = 'rating_board';
protected $primaryKey = 'id';
public $timestamps = false;
public function gameR2ratB(){
return $this->hasMany('seance\modele\Game_Rating', 'id');
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment