xety/laravel-rcon is a Laravel package for source rcon protocol service provider for laravel.
It currently has 0 GitHub stars and 11 downloads on Packagist (latest version v1.0.3).
Install it with composer require xety/laravel-rcon.
Discover more Laravel packages by xety
or browse all Laravel packages to compare alternatives.
Last updated
This package is developed to provide Laravel Framework service allowing you to work with source RCON protocol. You can read more protocol specification on this page: https://developer.valvesoftware.com/wiki/Source_RCON_Protocol
composer require lukasz-adamski/laravel-rcon
config/app.php:Adams\Rcon\RconServiceProvider::class,
config/app.php:'Rcon' => Adams\Rcon\Facades\Facade::class,
php artisan vendor:publish --provider="Adams\Rcon\RconServiceProvider"
You can setup environment variables to establish default RCON connection.
RCON_CONNECTION - default RCON connection name stored in config/rcon.php,RCON_HOST - RCON server hostname,RCON_PORT - RCON server listening port,RCON_PASSWORD - passphrase used to authorize connection, you can use null to skip authorization,RCON_TIMEOUT - RCON server connection timeout.To run predefined test set use:
php vendor/bin/phpunit
Below you have example controller implementation:
<?php
namespace App\Http\Controllers;
use Rcon;
use App\Http\Controllers\Controller;
class SimpleRconController extends Controller
{
/**
* Execute status command on default RCON server.
*
* @return Response
*/
public function defaultStatus()
{
$response = Rcon::command('status');
return view('console', compact('response'));
}
/**
* Execute status command on specified RCON connection.
*
* @return Response
*/
public function gameServerStatus()
{
$response = Rcon::connection('game_server')
->command('status');
return view('console', compact('response'));
}
}