in controller.php (parent class)
function __construct() {
DB::disconnect('DataBase');
}
child class of parent class
i disconnect the database globally and reconnect the needed functions in child class
public function getDomain()
{
DB::reconnect('DataBase');
$select = "select * from product";
$execute = DB::select($select);
print_r($execute);
return view('test');
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire