Download the PHP package tkeer/ease-request without Composer

On this page you can find all versions of the php package tkeer/ease-request. 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 ease-request

How it works

Inside the rules function of FormRequest class, write rule like this

Whenever you will place any keyword inside curly braces EaseRequest will replace those keyword with values fetched from Request or your custom function

If group_id is 3 in Request, above rule will be converted to following

About EaseRequest

EaseRequest is laravel package that supports updating FormRequest validation rules at the run time.

Example

Let suppose you want to update a student data, student have class_id and school_id. You want to update student's class and you want to validate that class exists in the database. With current laravel implementation, it will work fine. Here is the rule..

What if you want also to verify that the class also belongs to the student's school. Laravel gives you the option for adding the where conditions to the rule.

But you have to provide hard coded value for where conditions.

Using this package you can update your rules at run time. You can add your keyword in culry braces and this package will fetch the values from the Request and update the rule.

You can also define a method to be called for updating the rules instead of fetching value from Request class. Just write the method in your class with same name of the keyword written in curly braces. This way your method will called and returned value from your method will be added at the place of the keyword.

Installation

composer require tkeer/ease-request 1.*

Usage

Using abstract class EaseRequest

Extend your class by EaseRequest instead of FormRequest, implement abstract function preRules in your class and define all your rules in that function.

Using trait EaseRequestTrait

Extend your class by FormRequest and add EaseRequestTrait in the class. Define preRules function in you class and add all your rules in that function.


All versions of ease-request with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version >=5.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 tkeer/ease-request contains the following files

Loading the files please wait ....