Code Monkey home page Code Monkey logo

laravel-ts3-php-framework's Introduction

laravel-ts3-php-framework

planetteamspeak/ts3-php-framework integration for Laravel 9.0 and higher

INFO: This package uses a singleton to access a single TeamSpeak3_Adapter_Abstract|TeamSpeak3_Node_Server.class-object. So you currently can't access multiple TeamSpeak3 servers!

Supported Laravel Versions

Laravel Version Supported
9.0 โœ”๏ธ

Installation

This package will be autodiscovered, so no further setup is needed.

composer require nick-strohm/laravel-ts3-php-framework

Configuration

Copy configuration to config folder:

$ php artisan vendor:publish --provider=NickStrohm\laravel_ts3_php_framework\Providers\TeamspeakServiceProvider

Add environmental variables to your .env

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

After completing all steps from above you should have a configuration file under: config/teamspeak.php. There you can configure some other aspects like the name of the ServerQuery.

Example

An example for a controller to the /clients endpoint that lists all connected clients.

Route::get('/users', function (\TeamSpeak3_Node_Server $ts) {
    $result = $ts->clientList();
    dd($result);
});

Credits

Based on Micky5991's library which integrates par0noid's ts3admin.class library

laravel-ts3-php-framework's People

Contributors

nick-strohm avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.