Download the PHP package fab2s/laravel-dt0 without Composer

On this page you can find all versions of the php package fab2s/laravel-dt0. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-dt0

Laravel Dt0

CI QA codecov Latest Stable Version PRs Welcome License

Laravel support for fab2s/dt0, a DTO (Data-Transfer-Object) PHP implementation that can both secure mutability and implement convenient ways to take control over input and output in various formats.

Installation

Dt0 can be installed using composer:

Usage

Laravel Dt0 only adds Validation implementation and model attribute casting to Dt0. All other features will work exactly the same. Have a look at Dt0 to find out more.

Caster

In addition to Dt0 casters, Laravel Dt0 adds a CollectionOfCaster which can be used to strongly type a Laravel Collection:

``

It can be used as an inspiration to cast into more types.

Validation

Laravel Dt0 is able to leverage the full power of Laravel validation on each of its public properties. The validation is performed on the input data prior to any property casting or instantiation.

Laravel Dt0 comes with a laravel validation.

To use it on any Dt0, just add the Validate class attribute :

``

Rules can be added in three ways:

Combo of the above three are permitted as illustrated in ValidatableDt0.

In case of redundancy, priority will be first in Validate, Rules then Rule. Dt0 has no opinion of the method used to define rules. They will all perform the same as they are compiled once per process and kept ready for any reuse.

Validation is performed using withValidation method:

Model Attribute casting

Should you want to use a Dt0 as a Laravel Model attribute, you can directly cast it as your Dt0 thanks to the generic cast Dt0Cast.

Only requirement is for your Dt0 to extend fab2s\Dt0\Laravel\LaravelDt0Trait.

``

Requirements

Dt0 is tested against php 8.1 and 8.2 and Laravel 10 / 11

Contributing

Contributions are welcome, do not hesitate to open issues and submit pull requests.

License

Dt0 is open-sourced software licensed under the MIT license.


All versions of laravel-dt0 with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
fab2s/dt0 Version ^0.0.1
illuminate/translation Version ^10.0|^11.0
illuminate/validation Version ^10.0|^11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fab2s/laravel-dt0 contains the following files

Loading the files please wait ....