https://github.com/bedus-creation/aammui-dto
https://github.com/bedus-creation/aammui-dto
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bedus-creation/aammui-dto
- Owner: bedus-creation
- Created: 2023-02-02T18:15:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-02T18:39:54.000Z (over 3 years ago)
- Last Synced: 2025-04-07T21:16:24.383Z (about 1 year ago)
- Language: PHP
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
##### Uses
At first let's define a `FormRequest` class
```php
use Aammui\FormRequest\FormRequest;
class StorePostFormRequest extends FormRequest
{
public string $email;
public string $name;
public function authorize(): bool
{
return true;
}
public function rules()
{
return [
'email' => 'required|email',
'name' => 'required'
];
}
protected function passedValidation(): void
{
$this->name = $this->input('name');
$this->email = $this->input('email');
}
}
```