yasser-elgammal/laravel-wasl-erental
Composer 安装命令:
composer require yasser-elgammal/laravel-wasl-erental
包简介
Laravel integration for Saudi TGA and Elm Rabet WASL eRental APIs for rental companies, vehicle eligibility, location updates, and rental operations.
关键字:
README 文档
README
Laravel API client for Rabet WASL eRental / Rental Companies integrations in Saudi Arabia.
Package: yasser-elgammal/laravel-wasl-erental
About WASL Platform
WASL is an advanced digital platform launched by Saudi Arabia's Transport General Authority (TGA) in cooperation with Elm. It connects land-transport establishments with regulatory authorities to support vehicle tracking and the monitoring of transportation activities, including taxis, freight trucks, and freight brokers, helping improve safety, operational efficiency, and regulatory compliance across Saudi Arabia's transportation sector.
This Laravel package focuses specifically on integration with the Rabet WASL eRental API for rental companies. It provides fluent builders and raw service methods for vehicle registration, vehicle eligibility inquiry, current-location updates, and rental-operation registration. All operations return a WaslResponse DTO.
It does not create database tables, jobs, routes, scheduled tasks, or application-specific model updates.
Requirements
- PHP 8.0+
- Laravel 13 requires PHP 8.3+
- Laravel 9, 10, 11, 12, or 13
Installation
composer require yasser-elgammal/laravel-wasl-erental
Publish and check the configuration:
php artisan vendor:publish --tag=wasl-erental-config php artisan wasl-erental:check-config
Configuration
WASL_ERENTAL_BASE_URL=https://rabet-wasl.api.elm.sa WASL_ERENTAL_CLIENT_ID= WASL_ERENTAL_APP_ID= WASL_ERENTAL_APP_KEY= WASL_ERENTAL_TIMEOUT=30 WASL_ERENTAL_RETRY_TIMES=1 WASL_ERENTAL_RETRY_SLEEP=200 WASL_ERENTAL_THROW=false WASL_ERENTAL_LOG_REQUESTS=false WASL_ERENTAL_LOG_CHANNEL=null
Never expose app-key in frontend or mobile applications. Send all WASL requests from your backend.
Quick Start
use YasserElgammal\WaslErental\Facades\Wasl; $response = Wasl::vehicleInquiry() ->plateLetters(right: 'ا', middle: 'ب', left: 'ح') ->plateNumber('1234') ->sequenceNumber('123456879') ->send(); if ($response->isVehicleValid()) { // Allow the vehicle to be rented. }
Vehicle inquiry also accepts the complete plate:
$response = Wasl::vehicleInquiry() ->plate('ا ب ح 1234') ->sequenceNumber('123456879') ->send();
Use one plate-input style per inquiry. In plateLetters(), the arguments are ordered from the right side of the plate to the left: right, middle, then left.
Complete Guide
The Complete Guide is the full package reference. It covers:
- Package scope and requirements
- Installation, publishing configuration, and configuration
- Security, authentication headers, and base URL
- Available endpoints and facade entry points
- Fluent builder and raw-array usage
WaslResponsemethods- Technical success versus business success
- Vehicle registration
- Arabic plate letters and their right-to-left order
- Vehicle eligibility inquiry using either plate-input style
- Current-location updates and partial failures
- Rental-operation registration
- Date formatting
- Validation, connection, and configuration exceptions
- Optional request logging
- Suggested application workflow
- Troubleshooting
Supported Services
| Service | Endpoint |
|---|---|
| Vehicle registration | POST /api/eRental/v1/vehicles |
| Vehicle eligibility inquiry | GET /api/eRental/v1/inquiry/vehicles |
| Current-location update | POST /api/eRental/v1/locations |
| Rental-operation registration | POST /api/eRental/v1/rental-operation |
License
MIT.
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-07-13