PHPackages                             clickspacebr/laravel-advanced-request - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. clickspacebr/laravel-advanced-request

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

clickspacebr/laravel-advanced-request
=====================================

01PHP

Since Apr 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/clickspacebr/laravel-advanced-request)[ Packagist](https://packagist.org/packages/clickspacebr/laravel-advanced-request)[ RSS](/packages/clickspacebr-laravel-advanced-request/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Map request fields to Eloquent fields in Laravel
================================================

[](#map-request-fields-to-eloquent-fields-in-laravel)

This package allows you to configure a different structure of fields for the requests and to map with a database field (with Eloquent).

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require clickspacebr/laravel-request-fields
```

Usage
-----

[](#usage)

You must let your model use the `Clickspace\RequestFields\MapRequestFields` trait.

```
use Illuminate\Database\Eloquent\Model;
use Clickspace\RequestFields;

class TestModel extends Model
{
    use MapRequestFields;

    protected static $requestFields = [
        'address.street' => 'address_street',
        'address.street_number' => 'address_street_number',
        'address.complement' => 'address_complement',
        'address.neighborhood' => 'address_neighborhood',
        'address.city' => 'address_city',
        'address.state' => 'address_state',
        'address.zipcode' => 'address_zipcode'
    ];
}
```

In the method that you want to map the request fields to, follow the example below.

```
public function store(Request $request)
{
    $request->merge(Model::mapRequest($request));
```

Testing
-------

[](#testing)

```
composer test
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/177688?v=4)[Luís Victor Quintas](/maintainers/luisvquintas)[@luisvquintas](https://github.com/luisvquintas)

---

Top Contributors

[![luisvquintas](https://avatars.githubusercontent.com/u/177688?v=4)](https://github.com/luisvquintas "luisvquintas (1 commits)")

### Embed Badge

![Health badge](/badges/clickspacebr-laravel-advanced-request/health.svg)

```
[![Health](https://phpackages.com/badges/clickspacebr-laravel-advanced-request/health.svg)](https://phpackages.com/packages/clickspacebr-laravel-advanced-request)
```

###  Alternatives

[marcosh/php-validation-dsl

A DSL for validating data in a functional fashion

483.9k](/packages/marcosh-php-validation-dsl)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
