Download the PHP package chrisjohnleah/velocity-fleet-api-laravel without Composer

On this page you can find all versions of the php package chrisjohnleah/velocity-fleet-api-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package velocity-fleet-api-laravel

Velocity Fleet API — Laravel Bridge

CI Packagist Version Total Downloads PHP Version

The Laravel bridge for chrisjohnleah/velocity-fleet-api — the framework-agnostic Radius Velocity Fleet telematics SDK. Adds a service provider, a facade, a persistent Eloquent token store, and artisan commands so a Laravel app talks to the API with zero wiring.

This package only wires the SDK into Laravel — auth, refresh, HTTP, and the typed DTOs all live in the core SDK.

Requirements

Installation

The service provider and VelocityFleet facade are auto-discovered. Publish the config and run the migration that backs the token store:

Configuration

Set the credentials in your .env. There are two ways to authenticate (you only need one):

Whatever you set is auto-seeded into the token store on first use. The mode is decided by what you provide: a refresh token uses the OAuth2 refresh flow (with proactive refresh and reactive retry on a 401); a bare access token is used as a static Bearer token. A stored token always wins over config, so a redeploy never clobbers a rotated refresh token.

Usage

Via the facade:

Or inject the client (type-hint the core class — the container builds it for you):

Artisan commands

Token persistence

Tokens live in a single velocity_fleet_tokens row via EloquentTokenStore (bound to the core's TokenStore contract). put() overwrites that row, so a rotated refresh token always replaces the previous one. Change the table name with VELOCITY_FLEET_TOKEN_TABLE, or bind your own TokenStore implementation to swap the storage entirely.

Errors

The core SDK throws typed exceptions, all extending ChrisJohnLeah\VelocityFleet\Exceptions\VelocityFleetException:

Exception When
NotConnectedException No token available — run velocity-fleet:connect or set the env vars
AuthenticationException 401/403 after a refresh attempt — re-authorise
ApiException Any other API error (carries ->status, ->body, ->headers, header(), retryAfter())

Observability (optional)

Want outgoing Velocity API calls to show up in Laravel Telescope or Nightwatch? Install the official Saloon Laravel plugin — it auto-registers recording middleware on every connector, no changes here required:

Fleet platform (v0.2)

On top of the thin bridge, the package ships an opt-in fleet platform. Every subsystem below defaults to OFF/safe — upgrading changes nothing until you enable it in config/velocity-fleet.php.

Fleet queries

VelocityFleet::fleet($customerId) returns a chainable DeviceCollection:

Scopes: moving(), idling(), ignitionOn(), ignitionOff(), online(), offline(), inDeviceGroup(), inDriverGroup(), near(), byRegistration(), withDriver().

Caching (stale-while-revalidate)

VelocityFleet::cached()->positions($id) serves positions from a refresh-rate-aware cache with Cache::lock single-flight, so concurrent callers/workers collapse to one upstream POST per window. The TTL comes from the API's own live-map hints, clamped by cache.min_ttl. For multi-server / Octane, use a shared atomic-lock store (redis/database/memcached)velocity-fleet:doctor warns otherwise.

Change-detection events

Enable polling, run a queue worker and the scheduler, and the poller fires events as devices change:

IgnitionTurnedOn · IgnitionTurnedOff · VehicleStartedMoving · VehicleStopped · DeviceWentStale · DeviceCameBackOnline, plus the umbrella DevicePositionsUpdated. Listen for them like any Laravel event.

Geofences & notifications

Define circle or polygon Geofences; with geofencing on, the matcher fires VehicleEnteredGeofence / VehicleExitedGeofence / VehicleDwelledInGeofence / VehicleArrived. With notifications on, arrival/offline/geofence/speeding/idling notifications are sent to configured routes, throttled to avoid storms. Speeding/idling are heuristics derived from poll cadence.

History (opt-in, encrypted)

With history.enabled, each poll ingests positions into velocity_fleet_device_positions (PII columns encrypted at rest, idempotent upsert). retention.positions_days (default 90) prunes old rows. Off by default — see GDPR notes in SECURITY.md.

Commands

Testing toolkit

Testing

Tests run against an in-memory SQLite database and never hit the network.

Contributing

Issues and PRs welcome — see SECURITY.md.

Licence

MIT © Chris John Leah. See LICENSE.

Not affiliated with or endorsed by Radius or Velocity Fleet. "Radius", "Velocity" and "Kinesis" are trademarks of their respective owners.


All versions of velocity-fleet-api-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
chrisjohnleah/velocity-fleet-api Version ^0.1.2
illuminate/bus Version ^11.0 || ^12.0 || ^13.0
illuminate/cache Version ^11.0 || ^12.0 || ^13.0
illuminate/console Version ^11.0 || ^12.0 || ^13.0
illuminate/contracts Version ^11.0 || ^12.0 || ^13.0
illuminate/database Version ^11.0 || ^12.0 || ^13.0
illuminate/encryption Version ^11.0 || ^12.0 || ^13.0
illuminate/events Version ^11.0 || ^12.0 || ^13.0
illuminate/notifications Version ^11.0 || ^12.0 || ^13.0
illuminate/queue Version ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^11.0 || ^12.0 || ^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chrisjohnleah/velocity-fleet-api-laravel contains the following files

Loading the files please wait ...