Download the PHP package rapidwebltd/no-post-data-laravel-middleware without Composer

On this page you can find all versions of the php package rapidwebltd/no-post-data-laravel-middleware. 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 no-post-data-laravel-middleware

No Post Data Laravel Middleware

Under certain conditions, when posting data from a form, the web server may lose the post data. This commonly happens if a user is uploading a large file beyond the size limits set in the web server's configuration.

Laravel does not handle this situation and may end up throwing a somewhat confusing TokenMismatchException in VerifyCsrfToken due to CSRF protection.

The 'No Post Data Laravel Middleware' handles situations in which a post request has been submitted and contains no post data - a situation which should not occur under normal usage. By default, the middleware will redirect back to the previous page with an error message flashed to the session. This can then be output on your view as you would normally handle validation errors.

If needed, you can also modify this default behaviour and allow any code to run when the 'post request with no post data' situation is encountered.

Installation

  1. Run composer require rapidwebltd/no-post-data-laravel-middleware.
  2. Add RapidWeb\NoPostDataLaravelMiddleware\ServiceProvider::class, to the providers array in your config/app.php file.
  3. Add \RapidWeb\NoPostDataLaravelMiddleware\Http\Middleware\NoPostData::class, to the middleware array in your app/Http/Kernel.php file. This must be added after \Illuminate\View\Middleware\ShareErrorsFromSession::class, and before \App\Http\Middleware\VerifyCsrfToken::class,.
  4. Run php artisan vendor:publish.
  5. If you wish, edit the default errorMessage variable in your newly published config/nopostdata.php file.
  6. If you want to fully change the middleware's behaviour, you can also edit the closure variable found in the config/nopostdata.php file.

All versions of no-post-data-laravel-middleware with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
laravel/framework Version 5.*
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 rapidwebltd/no-post-data-laravel-middleware contains the following files

Loading the files please wait ....