Download the PHP package kjos/kjos-laravel-parameter-mapper without Composer
On this page you can find all versions of the php package kjos/kjos-laravel-parameter-mapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kjos/kjos-laravel-parameter-mapper
More information about kjos/kjos-laravel-parameter-mapper
Files in kjos/kjos-laravel-parameter-mapper
Package kjos-laravel-parameter-mapper
Short Description ParameterMapper tool for Laravel and other
License MIT
Informations about the package kjos-laravel-parameter-mapper
๐ Multilanguage | Multilingual
- ๐ซ๐ท French Version
- ๐ฌ๐ง English Version
๐ฌ๐ง English
Kjos Laravel Parameter Mapper
A Laravel package that allows you to dynamically map GET and POST parameters sent by the client to your application's backend keys, and vice versa. Useful for hiding the actual field names from the user or for standardizing your APIs.
Installation
For Laravel 12 or higher:
Publish the configuration
Configuration
Middleware
Class ParameterMapper
Use in Factories
Becomes:
API Example
Request:
Automatically transformed into:
๐ reject-knowns โ Reject internal parameters
The reject-knowns parameter allows you to automatically reject any request that contains a parameter corresponding to an internal backend key.
Purpose
To prevent users from directly sending backend (internal) field names that are normally hidden behind the front-end map.
For example, if you have this map:
and reject-knowns is enabled:
Then a request like:
will be rejected with an HTTP 404 error, because user_id is an internal parameter and should not be exposed on the front end.
Comment to enable it
In the configuration file config/parameter-mapper.php
Map the response
In the configuration file config/parameter-mapper.php
Schema
๐ Directory Structure
๐ค Author
Maintained by Jean Koffi
๐ License
MIT ยฉ kjos/kjos-laravel-parameter-mapper
๐ค Call for contributions
This project is open to contributions! Are you a developer, passionate about Laravel, or interested in multi-tenant architecture?
-Fork the project
-
Create a branch (klpm/my-feature)
- Make a PR ๐งช
All versions of kjos-laravel-parameter-mapper with dependencies
illuminate/support Version ^8.0|^10.0|^11.0|^12.0
illuminate/database Version ^8.0|^10.0|^11.0|^12.0
illuminate/console Version ^8.0|^10.0|^11.0|^12.0
illuminate/routing Version ^8.0|^10.0|^11.0|^12.0
laravel/pint Version ^1.20