-
KELBERT Paul authoredKELBERT Paul authored
CQuestion1.php 613 B
<?php
namespace seance\reponse;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use seance\modele\Game;
use Illuminate\Database\Capsule\Manager as DB;
class CQuestion1
{
public function __construct()
{
echo "<a href='index.php'>Retour au menu</a><br><br>";
$file = parse_ini_file('conf.ini');
$db = new DB();
$db->addConnection($file);
$db->setAsGlobal();
$db->bootEloquent();
$c = Game::where("name", "like","%mario%")->get();
foreach ($c as $char) {
echo $char->name . "<br>";
}
}
}