PHP code example of mivodev / laravel-radius
1. Go to this page and download the library: Download mivodev/laravel-radius 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/ */
mivodev / laravel-radius example snippets
use Mivo\LaravelRadius\Facades\Radius;
// Disconnect a user on the default server configured in .env
$success = Radius::disconnectUser('john_doe');
use Mivo\LaravelRadius\Facades\Radius;
// Fetch NAS IP dynamically from the database
$nasConfig = [
'server' => '10.0.0.5',
'secret' => 'nas_secret_key',
'port' => 3799,
];
// Disconnect user on a specific NAS
$success = Radius::connect($nasConfig)->disconnectUser('john_doe');