PHP code example of micky5991 / laravel-ts3admin
1. Go to this page and download the library: Download micky5991/laravel-ts3admin library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
micky5991 / laravel-ts3admin example snippets
Route::get('/users', function(\ts3admin $ts) {
$result = $ts->clientList();
if($ts->succeeded($result)) {
$users = $ts->getElement("data", $result);
dd($users);
} else {
return "Connection failed";
}
});
bash
$ php artisan vendor:publish --provider=Micky5991\laravel_ts3admin\Providers\TeamspeakServiceProvider
TS_SERVER_HOST=127.0.0.1
TS_SERVER_PORT=9987
TS_SERVER_TIMEOUT=2
TS_QUERY_PORT=10011
TS_QUERY_USERNAME=serveradmin
TS_QUERY_PASSWORD=supersecretpassword