moltaqa / wasl
Package to assest our team handling the wasl integration
v1.0.11
2023-12-12 11:56 UTC
Requires
- php: ^8.0
- alkoumi/laravel-hijri-date: ^1.0
- guzzlehttp/guzzle: ^7.2@dev
Requires (Dev)
- phpunit/phpunit: ^9.6
README
moltaqa/wasl
works for Laravel 8 , 9 and 10 applications running on PHP 8.0 and above.
Based On
Integration Guide for Dispatching Companies
- Version v2.24
- Version date 22/05/2023
Official Package Documentation
The official documentation for moltaqa wasl can be found on the Moltaqa Packages website.
Installing
The recommended way to install WASL is through Composer.
composer require moltaqa/wasl
Publishing Service Provider
Supports auto discovery
php artisan vendor:publish --provider="Moltaqa\Wasl\WaslServiceProvider"
Publishing Assets
to publish WASL config and lang
php artisan vendor:publish --tag=moltaqa-wasl
Basic Usage
Use Wasl::getInstance()
to create and initialize a WASL instance.
# List Supported Vehicle Plate Letters echo Wasl::getInstance()->getVehiclePlateLetters(); # Register a driver and his vehicle # has an option to calculate the value of "dateOfBirthHijri" echo Wasl::getInstance()->registerDriverAndVehicle( driverData: [ "driver" => [ "identityNumber" => "1234567890", "dateOfBirthHijri" => "1411/01/01", "dateOfBirthGregorian" => "1990-01-01", "emailAddress" => "address@email.com", "mobileNumber" => "+966512345678", ] ], vehicleData: [ "vehicle" => [ "sequenceNumber" => "123456879", "plateLetterRight" => "ا", "plateLetterMiddle" => "ا", "plateLetterLeft" => "ا", "plateNumber" => "1234", "plateType" => "1" ] ], calcHijriDate: false ); # check if a driver registration is still valid at WASL echo Wasl::getInstance()->driverCheckEligibility(identityNumbers: '1234567890'); # check if list of drivers registrations is still valid at WASL echo Wasl::getInstance()->driverCheckEligibility(identityNumbers: ['1234567890','1234567891']);
Credits
License
The MIT License (MIT). Please see License File for more information.