Looking to hire Laravel developers? Try LaraJobs

laravel-wasl-erental maintained by yasser-elgammal

Description
Laravel integration for Saudi TGA and Elm Rabet WASL eRental APIs for rental companies, vehicle eligibility, location updates, and rental operations.
Last update
2026/07/13 23:06 (dev-main)
License
Links
Downloads
5

Comments
comments powered by Disqus

Laravel WASL eRental

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:

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.