Skip to content

Introduction

Data Transfer Object extension package for easy generation of data rules and inspection of transfer data. Works with Laravel projects.

Installation

To install through Composer, by run the following command:

sh
composer require fresns/dto

Generate DTO

  • Generate a new DTO (path: /app/DTO/)
sh
php artisan make:dto BaseDTO
  • Generate a new DTO (to the specified path)
sh
php artisan make:dto BaseDTO --path /app/Fresns/Panel

Reference

See the Laravel documentation for the rules that can be used for validation.

Released under the Apache-2.0 License