PHPackages                             uretral/bitrix-data - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. uretral/bitrix-data

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

uretral/bitrix-data
===================

Create unified resources and data transfer objects

028PHP

Since Aug 10Pushed 9mo agoCompare

[ Source](https://github.com/uretral/bitrix-data)[ Packagist](https://packagist.org/packages/uretral/bitrix-data)[ RSS](/packages/uretral-bitrix-data/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Powerful data objects for Laravel
=================================

[](#powerful-data-objects-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/04708cf608a34e47ac9147191b5abdf2d7ca652b0f5005a7455e99755b7d89a4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370617469652f6c61726176656c2d646174612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-data)[![Tests](https://github.com/spatie/laravel-data/actions/workflows/run-tests.yml/badge.svg)](https://github.com/spatie/laravel-data/actions/workflows/run-tests.yml)[![PHPStan](https://github.com/spatie/laravel-data/actions/workflows/phpstan.yml/badge.svg)](https://github.com/spatie/laravel-data/actions/workflows/phpstan.yml)[![Check & fix styling](https://github.com/spatie/laravel-data/actions/workflows/php-cs-fixer.yml/badge.svg)](https://github.com/spatie/laravel-data/actions/workflows/php-cs-fixer.yml)[![Total Downloads](https://camo.githubusercontent.com/3cbd97b845d0cd41ecaf5a0cf1f1756c11f0e16288aa03e6f7c2b500c780b8bd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370617469652f6c61726176656c2d646174612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-data)

This package enables the creation of rich data objects which can be used in various ways. Using this package you only need to describe your data once:

- instead of a form request, you can use a data object
- instead of an API transformer, you can use a data object
- instead of manually writing a typescript definition, you can use... 🥁 a data object

A `laravel-data` specific object is just a regular PHP object that extends from `Data`:

```
use Uretral\BitrixData\Data;

class SongData extends Data
{
    public function __construct(
        public string $title,
        public string $artist,
    ) {
    }
}
```

By extending from `Data` you enable a lot of new functionality like:

- Automatically transforming data objects into resources (like the Laravel API resources)
- Transform only the requested parts of data objects with lazy properties
- Automatically creating data objects from request data and validating them
- Automatically resolve validation rules for properties within a data object
- Make it possible to construct a data object from any type you want
- Add support for automatically validating data objects when creating them
- Generate TypeScript definitions from your data objects you can use on the frontend
- Save data objects as properties of an Eloquent model
- And a lot more ...

Why would you be using this package?

- You can be sure that data is typed when it leaves your app and comes back again from the frontend which makes a lot less errors
- You don't have to write the same properties three times (in a resource, in a data transfer object and in request validation)
- You need to write a lot less of validation rules because they are obvious through PHP's type system
- You get TypeScript versions of the data objects for free

Are you a visual learner?
-------------------------

[](#are-you-a-visual-learner)

In this talk, given at Laracon, you'll see [an introduction to Laravel Data](https://www.youtube.com/watch?v=CrO_7Df1cBc).

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/db4182c9f754c4512017c316b58e9d5f00206e00eab9324e793913f3f63bb50d/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6c61726176656c2d646174612e6a70673f743d31)](https://spatie.be/github-ad-click/laravel-data)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

Documentation
-------------

[](#documentation)

You will find full documentation on the dedicated [documentation](https://spatie.be/docs/laravel-data/v4/introduction) site.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Ruben Van Assche](https://github.com/rubenvanassche)
- [Aidan Casey](https://github.com/aidan-casey) (Validation Attributes)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance43

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 71.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/cdc843fe72df310c03ebba24b0e33e1ea4e525273c06bb1d7e4df67b02bac9ff?d=identicon)[uretral](/maintainers/uretral)

---

Top Contributors

[![rubenvanassche](https://avatars.githubusercontent.com/u/619804?v=4)](https://github.com/rubenvanassche "rubenvanassche (1134 commits)")[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (76 commits)")[![alexmanase](https://avatars.githubusercontent.com/u/10696975?v=4)](https://github.com/alexmanase "alexmanase (70 commits)")[![Mohammad-Alavi](https://avatars.githubusercontent.com/u/24431504?v=4)](https://github.com/Mohammad-Alavi "Mohammad-Alavi (35 commits)")[![innocenzi](https://avatars.githubusercontent.com/u/16060559?v=4)](https://github.com/innocenzi "innocenzi (24 commits)")[![ragulka](https://avatars.githubusercontent.com/u/593267?v=4)](https://github.com/ragulka "ragulka (22 commits)")[![clementbirkle](https://avatars.githubusercontent.com/u/9021081?v=4)](https://github.com/clementbirkle "clementbirkle (19 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (15 commits)")[![bentleyo](https://avatars.githubusercontent.com/u/1701266?v=4)](https://github.com/bentleyo "bentleyo (14 commits)")[![uretral](https://avatars.githubusercontent.com/u/27734113?v=4)](https://github.com/uretral "uretral (12 commits)")[![Klaas058](https://avatars.githubusercontent.com/u/16153346?v=4)](https://github.com/Klaas058 "Klaas058 (12 commits)")[![abenerd](https://avatars.githubusercontent.com/u/7523903?v=4)](https://github.com/abenerd "abenerd (12 commits)")[![morrislaptop](https://avatars.githubusercontent.com/u/67807?v=4)](https://github.com/morrislaptop "morrislaptop (11 commits)")[![Tofandel](https://avatars.githubusercontent.com/u/6115458?v=4)](https://github.com/Tofandel "Tofandel (11 commits)")[![erikgaal](https://avatars.githubusercontent.com/u/1234268?v=4)](https://github.com/erikgaal "erikgaal (11 commits)")[![shuvroroy](https://avatars.githubusercontent.com/u/21066418?v=4)](https://github.com/shuvroroy "shuvroroy (11 commits)")[![alexrififi](https://avatars.githubusercontent.com/u/21067613?v=4)](https://github.com/alexrififi "alexrififi (10 commits)")[![aidan-casey](https://avatars.githubusercontent.com/u/6686277?v=4)](https://github.com/aidan-casey "aidan-casey (9 commits)")[![eugen-stranz](https://avatars.githubusercontent.com/u/136219827?v=4)](https://github.com/eugen-stranz "eugen-stranz (9 commits)")[![Nir-An](https://avatars.githubusercontent.com/u/75239176?v=4)](https://github.com/Nir-An "Nir-An (8 commits)")

### Embed Badge

![Health badge](/badges/uretral-bitrix-data/health.svg)

```
[![Health](https://phpackages.com/badges/uretral-bitrix-data/health.svg)](https://phpackages.com/packages/uretral-bitrix-data)
```

###  Alternatives

[botman/botman

Create messaging bots in PHP with ease.

6.2k1.5M96](/packages/botman-botman)[slowprog/composer-copy-file

Composer script copying your files after install

481.0M29](/packages/slowprog-composer-copy-file)[denngarr/seat-fitting

Module to check fittings per character

1433.2k2](/packages/denngarr-seat-fitting)[thedmsgroup/mautic-enhancer-bundle

Various contact enhancer integrations for Mautic.

342.8k](/packages/thedmsgroup-mautic-enhancer-bundle)[francescomalatesta/laravel-amplitude

A Laravel package to work with Amplitude.

125.3k](/packages/francescomalatesta-laravel-amplitude)[xi/breadcrumbs-bundle

Xi breadcrumbs bundle for Symfony2 that utilises routes as a tree to build the breadcrumbs in order to not pollute the controller actions with repetitive breadcrumbs code.

113.2k](/packages/xi-breadcrumbs-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
