mecxer713/wialon-package

Laravel and Symfony SDK for the Wialon (Gurtam) API: auto authentication, facade, simplified calls, and local SSL handling.

Maintainers

Package info

github.com/Mecxer713/wialon-package

pkg:composer/mecxer713/wialon-package

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-02-05 13:25 UTC

This package is auto-updated.

Last update: 2026-04-05 13:51:33 UTC


README

๐Ÿš€ A developer-first, production-ready SDK to integrate the Wialon (Gurtam) API into Laravel & Symfony โ€” with zero-auth pain, zero-SSL pain, and a clean architecture youโ€™ll actually enjoy using.

๐Ÿ“š Table of Contents

Overview

Wialon SDK for Laravel & Symfony is a modern, open-source PHP SDK designed to make Wialon API integration simple, reliable, and enjoyable.

It abstracts away the two biggest pain points developers face when working with Wialon:

  • ๐Ÿ” Session management (SID) โ€” handled automatically, transparently, and safely
  • ๐Ÿ”’ SSL & cURL certificate errors โ€” fixed out of the box, even on Windows

Built around a pure PHP core and wrapped with native Laravel & Symfony integrations, this package lets you focus on business logic instead of boilerplate, edge cases, and environment issues.

Whether you are building a fleet management system, an internal dashboard, or a production SaaS, this SDK is designed to scale with confidence.

โœจ Key Highlights

  • ๐Ÿ” Zero-config authentication: automatic session (sid) lifecycle management

  • ๐Ÿง  Pure PHP core: reusable, testable, framework-independent logic

  • ๐Ÿงฉ Native integrations:

    • Laravel Facade & Artisan command
    • Symfony Bundle, DI & Console command
  • ๐Ÿ›  Built-in SSL fixer: automatic CA certificate download (cURL 60/77)

  • ๐Ÿš€ Developer Experience (DX) focused

๐Ÿ“ฆ Package Identity

  • Name: mecxer713/wialon-package

  • Type: Hybrid SDK (Laravel & Symfony)

  • Core dependencies:

    • guzzlehttp/guzzle
    • illuminate/support (Laravel)
    • symfony/http-kernel (Symfony)
  • Compatibility:

    • Laravel 10, 11, 12
    • Symfony 6, 7

2๏ธโƒฃ Laravel Integration Layer

Designed to feel 100% native to Laravel developers.

Components:

  • WialonServiceProvider โ€“ container binding & config publishing
  • Facades/Wialon.php โ€“ static access (Wialon::call())
  • Commands/TestWialonConnection.php โ€“ Artisan diagnostic command
  • config/wialon.php โ€“ Laravel configuration

3๏ธโƒฃ Symfony Integration Layer

Delivered as a standard Symfony Bundle.

Components:

  • WialonBundle.php โ€“ bundle entry point
  • DependencyInjection/WialonExtension.php โ€“ service injection
  • DependencyInjection/Configuration.php โ€“ YAML config validation
  • Commands/WialonCheckCommand.php โ€“ Console diagnostic command

๐Ÿ“ฅ Installation

composer require mecxer713/wialon-package

Laravel

php artisan vendor:publish --tag=wialon-config

Symfony

Enable the bundle (if not using Flex auto-discovery):

// config/bundles.php
Mecxer\WialonPackage\WialonBundle::class => ['all' => true],

โš™๏ธ Configuration

Environment variables

WIALON_TOKEN=your_token_here
WIALON_BASE_URL=https://hst-api.wialon.com/wialon/ajax.html
WIALON_DEFAULT_METHOD=POST
  • Laravel: config/wialon.php
  • Symfony: config/packages/wialon.yaml

๐Ÿš€ Quick Usage

Laravel (Facade)

use Mecxer\WialonPackage\Facades\Wialon;

Wialon::login();

$units = Wialon::getUnits();

Symfony (Dependency Injection)

use Mecxer\WialonPackage\WialonClient;

public function index(WialonClient $wialon)
{
    $units = $wialon->getUnits();
}

๐ŸŒ Generic API Calls

Wialon::call('core/search_items', [
    'spec' => [
        'itemsType' => 'avl_unit',
        'propName' => 'sys_name',
        'propValueMask' => '*',
        'sortType' => 'sys_name'
    ],
    'force' => 1,
    'flags' => 1,
    'from' => 0,
    'to' => 0
]);

๐Ÿ” GET vs POST

// POST (default & recommended)
Wialon::callPost('core/search_items', [...]);

// GET (optional)
Wialon::callGet('core/get_statistics', [...]);

๐Ÿ” SSL & Certificate Handling (Killer Feature)

Automatic Fix

php artisan wialon:check --download
# or
php bin/console wialon:check --download

โœ” Downloads a valid Mozilla CA bundle โœ” Fixes cURL error 60 / 77 (Windows) โœ” Tests API connectivity

Certificate location:

storage/certif/cacert.pem

๐Ÿงช Error Handling

try {
    $data = Wialon::getUnits();
} catch (\RuntimeException $e) {
    // Handle HTTP or API errors
}

โœ… Tests

vendor/bin/phpunit

๐Ÿ“Œ Why This Package?

โœ” One SDK for Laravel & Symfony โœ” No SID headaches โœ” No SSL headaches โœ” Clean architecture โœ” Production-ready

๐Ÿ“œ License

MIT