PHP code example of g4t / laravel-sas3-radius

1. Go to this page and download the library: Download g4t/laravel-sas3-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/ */

    

g4t / laravel-sas3-radius example snippets

sh
use g4t\Sas3\Sas3;
.
.
Sas3::connect($url, $username, $password)
            ->updateUser([
                "username" => "aa@aa",                  # username
                "address" => "11",                      # address
                "city" => "baghdad",                    # city
                "comment" => "comment",                 #comment
                "warning_notified" => "0",
                "country" => "Iraq",                    # country
                "contractid" => "",
                "createdon" => "2021-09-18",
                "downlimit" => 0,
                "comblimit" => "0",
                "email" => "",                          # email address
                "ipv6prefix" => "",
                "enableuser" => "1",                    # enable OR desabler
                "expiration" => "2023-04-07 09:00:00",  # expire date
                "nationalid" => null,           # natonal id
                "firstname" => "Hussein Alaa",    # first name
                "lastname" => "",
                "mac" => "",            # mac address
                "usemacauth" => "0",
                "mobile" => "",         # mobile number
                "image" => null,        # image
                "owner" => "1",         # owner id
                "srvid" => "41",        # profile id
                "staticipcpe" => "",
                "mt_filter_id" => "",
                "uplimit" => 0,
                "uptimelimit" => "00:00:00",
                "addresslist" => null,
                "framedroute" => "",
                "mikrotik_group" => "",
                "createdby2" => "admin@56",
                "owner2" => "admin@56",
                "profile" => "Light",
                "lastlogin" => null,
                "lastip" => null,
                "tpassword" => "22221",
                "simuse" => "1",
                "status" => [
                    "status" => "expired",
                    "dl" => "0",
                    "ul" => "0",
                    "comb" => "0",
                    "ut" => "0",
                    "exp" => "1",
                    "online" => "0",
                    "quota_remaining_total" => 0,
                    "quota_remaining_download" => 0,
                    "quota_remaining_upload" => 0
                ],
                "totaltraffic" => 0,
                "totalDownload" => null,
                "totalUpload" => null,
                "daily_downlimit" => 0,
                "daily_uplimit" => 0,
                "daily_total_limit" => 0,
                "macs" => []
            ]);