Download the PHP package maize-tech/laravel-remote-rule without Composer

On this page you can find all versions of the php package maize-tech/laravel-remote-rule. 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-remote-rule

# Laravel Remote Rule [![Latest Version on Packagist](https://img.shields.io/packagist/v/maize-tech/laravel-remote-rule.svg?style=flat-square)](https://packagist.org/packages/maize-tech/laravel-remote-rule) [![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/maize-tech/laravel-remote-rule/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/maize-tech/laravel-remote-rule/actions?query=workflow%3Arun-tests+branch%3Amain) [![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/maize-tech/laravel-remote-rule/php-cs-fixer.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/maize-tech/laravel-remote-rule/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amain) [![Total Downloads](https://img.shields.io/packagist/dt/maize-tech/laravel-remote-rule.svg?style=flat-square)](https://packagist.org/packages/maize-tech/laravel-remote-rule) Easily validate data attributes through a remote request. This package allows you to define a subset of custom rules to validate an incoming request data through an api call to a remote service. An example usage could be an application with an open registration form which should only allow a list of emails given by a remote service. You can find an example in the [Usage](#usage) section. ## Installation You can install the package via composer: You can publish and run the migrations with: You can publish the config file with: This is the content of the published config file: ## Usage ### Basic To use the package you can create a class which extends the `RemoteRule` abstract class. You can then create a new `RemoteRuleConfig` instance with the snake case name of the class you just created. The model will contain the url of the remote service used to send the request along with the request method (usually `POST` or `GET`) and, if needed, the custom headers, json body and timeout. We add this data to a database table as we consider it sensitive information, and we want to avoid hard-coding it to the codebase. All entries of the `remote_rule_configs` database table are indeed encrypted by default (can be disabled in the configs). You can create a remote rule config in your console with tinker: That's all! You can now just add your new custom rule to the validation array: Under the hood, the validation rule will send a request to the given url with the custom headers and body (where we append the attribute name and its value) and check whether the response is successful or not. ### Custom response status code You can change the expected response status code by overriding the `isSuccessful` method in your custom rule. ### Custom body attribute By default, all custom rules will append the attribute key-value pair to the request body, where the key is the name of the validated attribute, and the value is the input value of the form. You can change the body attribute sent to the remote service by overriding the `getBodyAttribute` method in your custom rule. ## Testing ## Changelog Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. ## Contributing Please see [CONTRIBUTING](https://github.com/maize-tech/.github/blob/main/CONTRIBUTING.md) for details. ## Security Vulnerabilities Please review [our security policy](https://github.com/maize-tech/.github/security/policy) on how to report security vulnerabilities. ## Credits - [Enrico De Lazzari](https://github.com/enricodelazzari) - [All Contributors](../../contributors) ## License The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

All versions of laravel-remote-rule with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/contracts Version ^9.0|^10.0|^11.0
illuminate/database Version ^9.0|^10.0|^11.0
illuminate/http Version ^9.0|^10.0|^11.0
illuminate/support Version ^9.0|^10.0|^11.0
spatie/laravel-package-tools Version ^1.14.1
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 maize-tech/laravel-remote-rule contains the following files

Loading the files please wait ....