Download the PHP package oltrematica/laravel-parking-hub without Composer

On this page you can find all versions of the php package oltrematica/laravel-parking-hub. 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 laravel-parking-hub

GitHub Tests Action Status GitHub PhpStan Action Status Latest Version on Packagist Total Downloads

Laravel ParkingHub

laravel-parking-hub is a Laravel package designed to create a unified and consistent way to interact with different parking service APIs (e.g., Parkeon, My Cicero). It aims to standardize the input and output of parking validation requests, making it easier to integrate and manage multiple parking providers.

Key features:

Prerequisites

Installation

Usage Guide

Configuration

  1. Publish the configuration file: To customize the default configuration, publish the parking-hub.php config file using the following Artisan command:

    This will create a config/parking-hub.php file in your application's config directory.

  2. Configure Your Drivers: Open the config/parking-hub.php file. Here you can define and configure your parking drivers.

    • Default Driver: Set the default_driver option to specify the driver to be used when no driver is explicitly chosen.

    • Driver Settings: Under the drivers array, configure each provider. Each driver configuration must include a class key, which specifies the class that implements the Oltrematica\\ParkingHub\\Contracts\\ParkingValidator interface. You will also add provider-specific settings like API keys, endpoints, etc.

    Ensure you have the necessary environment variables (e.g., EASYPARK_USERNAME, MYCICERO_PASSWORD) set in your .env file.

Basic Usage

You can interact with the parking drivers through the ParkingHub facade or by resolving the manager from the service container.

Using the Facade

Resolving from the Container

Understanding the Response

The checkPlate method returns a Oltrematica\ParkingHub\DTOs\ParkingValidationResponseData object. This DTO contains the following properties:

Adding a New Driver

To add support for a new parking service provider:

  1. Create a Validator Class: Implement the Oltrematica\ParkingHub\Contracts\ParkingValidator interface. This class will handle the interaction with the provider's API. The checkPlate method should:

    • Accept the license plate number and verification date/time as parameters.
    • Handle API response (success, errors, authentication issues).
    • Map the provider's response to the fields of ParkingValidationResponseData.

    Example (replace with actual API interaction and mapping logic):

  2. Configure the New Driver: Add its configuration to the drivers array in config/parking-hub.php:

  3. Use the New Driver:

Translations

This package includes translations for messages. To publish the translation files to your application's lang/vendor directory, use:

You can then customize the translations in lang/vendor/oltrematica-parking-hub/{locale}.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see GitHub repository.

Security Vulnerabilities

If you discover a security vulnerability within this package, please send an e-mail to security policy on GitHub.

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-parking-hub with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/contracts Version ^10.0|^11.0|^12.0
spatie/laravel-data Version ^4.15
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 oltrematica/laravel-parking-hub contains the following files

Loading the files please wait ....