Skip to content
Snippets Groups Projects
CQuestion2.php 577 B
<?php


namespace seance\reponse;


use Illuminate\Database\Capsule\Manager as DB;
use seance\modele\Company;

class CQuestion2
{
    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 = Company::where("location_country", "=","Japan")->get();

        foreach ($c as $char) {
            echo $char->id . "    " . $char->name . "<br>";
        }


    }
}