Laravel.io
public function register()
{
$this->app->bind(GameQ::class, function ($app) {
$servers = $app['config']['servers'];
$gameQ = new GameQ();
$gameQ->addServers($servers);
return $gameQ;
});
}
config/servers.php
return [
[
'type' => 'css',
'host' => '127.0.0.1:27015',
]
];