Download the PHP package folded/request without Composer

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

folded/request

Request utilities, including a request validator, for your PHP web app.

Packagist License Packagist PHP Version Support Packagist Version Build Status Maintainability TODOs

Summary

About

I need a way to pull a simple library to validate my request data when a form is submited. This library hopefuly solves this by faciliting the set up to be ready to validate request values.

Folded is a constellation of packages to help you setting up a web app easily, using ready to plug in packages.

Features

Requirements

Installation

1. Install the package

In your root folder directory, run this command:

2. Set up the library

If you want to use the request validation functions, use this code before validating your form data:

The lang folder should contain an arborescence made of folders named with the lang (like "en", "fr", "es", ...), which themselves contain a file named validation.php containing the translation of the validation error message.

As this library relies on Laravel's validation system, the validation errors messages are pulled from these files.

Here is the content of en/validation.php for example. You can start from this file to create translation for other languages.

Examples

1. Get a request value by its key

In this example, we will get the value of a request key after a post request has been submitted.

2. Check if a request key is present

In this example, we will check first if a key is present before echoing its content.

3. Get all the request values

In this example, we will get all the request value key-pairs in an array.

4. Validate a request

In this example, we will validate form request data.

For more information about the available validation, check Laravel's validation documentation, as this library relies on this system.

5. Check if a request validation succeeded

In this example, we will check if a request succeeded after validating it.

6. Get error messages after a request validation

In this example, we will get the errors messages of a failed request validation.

For more information about how to manipulate the errors, see Laravel's validation error documentation, as this library relies on this system.

7. Choosing the validation error language before validating request

In this example, before validating the request, we will change the language for the validation erorrs. Note that you should do it ideally right after the code from the Installation section: 2. Set up the library section.

8. Get an old submited form value

In this example, we will get a previously submitted form value. This is convenient if you want to display values the user used before an error occured (in order for the user to not loose everything he wrote).

If the key is not found, the getOldRequestValue() function returns null.

Version support

7.3 7.4 8.0
v0.1.0 ✔️
v0.2.0 ✔️
v0.3.0 ✔️
v0.3.1 ✔️
v0.3.2 ✔️
v0.3.3 ✔️

All versions of request with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0
illuminate/http Version 7.*
illuminate/validation Version 7.*
folded/exception Version 0.4.*
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 folded/request contains the following files

Loading the files please wait ....