Skip to content

Commit

Permalink
Update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickescobedo committed Jul 27, 2024
1 parent 1b54ea1 commit eacb2cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Cast request input in Laravel.
## Basic Usage
1. Add `NickEscobedo\Cambia\CastRequestAttributes` trait to your request class.
1. Add a `casts` function to your request class that returns an array.
1. Access casts via request attributes `$request->attributes->get('inputKey')`. Note: The request key must have be validated in rules before it will attempt to cast.
1. Access casts via request attributes `$request->castedInput('inputKey')`. Note: The request key must have be validated in rules before it will attempt to cast.

## Example
```php
Expand Down Expand Up @@ -37,17 +37,17 @@ class Cast extends FormRequest
- integer
- float
- double
- decimal
- decimal:int
- string
- boolean
- object
- array
- json
- collection
- date
- datetime
- datetime or datetime:format
- immutable_date
- immutable_datetime
- immutable_datetime or immutable_datetime:format
- timestamp


Expand Down

0 comments on commit eacb2cf

Please sign in to comment.