function __construct($server_id = null) { /* Establish just our basic elements in the constructor: */ /* $this->_securitySalt = CONFIG_SECURITY_SALT; $this->_bbbServerBaseUrl = CONFIG_SERVER_BASE_URL; */ //tsipizic TODO select next available instead of random if (!$server_id) { $bbb = Bbb::orderByRaw("RAND()")->first(); } else { $bbb = Bbb::findOrFail($server_id); } $this->_securitySalt = $bbb->secret; $this->_bbbServerBaseUrl = $bbb->url; $this->id = $bbb->id; }
public function help() { $bbb = Bbb::orderByRaw("RAND()")->first(); $bbb_check_url = parse_url($bbb->url, PHP_URL_SCHEME) . '://' . parse_url($bbb->url, PHP_URL_HOST) . '/check'; return view('main.help', ['bbb_check_url' => $bbb_check_url]); }