bfg/request

A slight addition to the Laravel Request

Maintainers

Details

github.com/bfg-s/request

Source

Issues

Installs: 62

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 1

Open Issues: 0

Type:bfg-app

0.0.3 2023-07-20 06:57 UTC

This package is auto-updated.

Last update: 2024-11-20 10:04:53 UTC


README

A slight addition to the Laravel Request complementing it using the transformation method.

Make request

Create the request as created, this package expands the Laravel command.

php artisan make:request UserRequest

You will be created the same file only inherited from Bfg\Request\FormRequest.

transformation

$request->transformation(array $validated);

Transformation callback for request validation result.

transform

Transform and get a request validation result.

save

$request->save(Model|Relation|Builder|string $model);

Send to preserving kernel BlessModel.

saveIf

$request->save(callable|bool $condition, Model|Relation|Builder|string $model);

Save any model with condition and request transform

Deactivate

php artisan uninstall bfg/request

Activate

php artisan install bfg/request