laravel-validated-dto

Data Transfer Objects with validation for Laravel applications

MIT License

Downloads
193.6K
Stars
641
Committers
18

Bot releases are hidden (Show)

laravel-validated-dto - v3.8.1

Published by WendellAdriel 30 days ago

What's Changed

New Contributors

Full Changelog: https://github.com/WendellAdriel/laravel-validated-dto/compare/v3.8.0...v3.8.1

laravel-validated-dto - v3.8.0 Latest Release

Published by WendellAdriel 3 months ago

laravel-validated-dto - v3.7.1

Published by WendellAdriel 3 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/WendellAdriel/laravel-validated-dto/compare/v3.7.0...v3.7.1

laravel-validated-dto - v3.7.0

Published by WendellAdriel 3 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/WendellAdriel/laravel-validated-dto/compare/v3.6.1...v3.7.0

laravel-validated-dto - v3.6.1

Published by WendellAdriel 3 months ago

laravel-validated-dto - v3.6.0

Published by WendellAdriel 3 months ago

What's Changed

Full Changelog: https://github.com/WendellAdriel/laravel-validated-dto/compare/v3.5.2...v3.6.0

laravel-validated-dto - v3.5.2

Published by WendellAdriel 5 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/WendellAdriel/laravel-validated-dto/compare/v3.5.1...v3.5.2

laravel-validated-dto - v3.5.1

Published by WendellAdriel 6 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/WendellAdriel/laravel-validated-dto/compare/v3.5.0...v3.5.1

laravel-validated-dto - v3.5.0

Published by WendellAdriel 7 months ago

laravel-validated-dto - v3.4.0

Published by WendellAdriel 9 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/WendellAdriel/laravel-validated-dto/compare/v3.3.0...v3.4.0

laravel-validated-dto - v3.3.0

Published by WendellAdriel about 1 year ago

laravel-validated-dto - v3.2.1

Published by WendellAdriel about 1 year ago

What's Changed

Full Changelog: https://github.com/WendellAdriel/laravel-validated-dto/compare/v3.2.0...v3.2.1

laravel-validated-dto - v3.2.0

Published by WendellAdriel about 1 year ago

laravel-validated-dto - v3.1.2

Published by WendellAdriel about 1 year ago

What's Changed

Full Changelog: https://github.com/WendellAdriel/laravel-validated-dto/compare/v3.1.1...v3.1.2

laravel-validated-dto - v3.1.1

Published by WendellAdriel about 1 year ago

What's Changed

Full Changelog: https://github.com/WendellAdriel/laravel-validated-dto/compare/v3.1.0...v3.1.1

laravel-validated-dto - v3.1.0

Published by WendellAdriel about 1 year ago

laravel-validated-dto - v3.0.1

Published by WendellAdriel about 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/WendellAdriel/laravel-validated-dto/compare/v3.0.0...v3.0.1

laravel-validated-dto - v3.0.0

Published by WendellAdriel about 1 year ago

laravel-validated-dto - v2.11.1

Published by WendellAdriel over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/WendellAdriel/laravel-validated-dto/compare/v2.11.0...v2.11.1

laravel-validated-dto - v2.11.0 - Callable Casting

Published by WendellAdriel over 1 year ago

Changes

  • Added the support for defining custom casting with callables/callbacks

Extended Docs

You can now create new Castable types for your project by using a callable/callback:

class CustomDTO extends ValidatedDTO
{
    protected function rules(): array
    {
        return [
            'url' => ['required', 'url'],
        ];
    }

    protected function defaults(): array
    {
        return [];
    }

    protected function casts(): array
    {
        return [
            'url' => function (string $property, mixed $value) {
                return new URLWrapper($value);
            },
        ];
    }
}

New Contributors

  • AL EMRAN (@emrancu) - #38