PHP Package: spatie/laravel-data

Spatie's Laravel Data library offering powerful data handling capabilities for Laravel applications, ensuring seamless data manipulation, validation, and transformation.

Current Version: 4.18.0
Last Updated: 2025-10-16
PHP Requirement: ^8.1
Dependencies:
illuminate/support
illuminate/database
⚠️ To ensure full functionality, the above dependencies might be required.

Package Description

Spatie's Laravel Data library provides robust features for efficient data management in Laravel projects. It encompasses a wide array of functions including data validation, transformation, and manipulation, enhancing the overall data handling experience for developers.

📦 Show all available classes🔗 View on GitHub

Download Latest Version: 4.19.0

Download Download v4.19.0

Previous Versions

Code Integration Example

Make sure to include the correct namespace and class paths for proper usage.

<?php
// Example from PHPlibraries.com
require_once 'libs/spatie/laravel-data/4.19.0/loader.php';
require_once 'libs/illuminate/support/12.48.1/loader.php';
require_once 'libs/illuminate/database/12.48.1/loader.php';

use Spatie\Data\Data;
use Illuminate\Support\ServiceProvider;

$obj = new Data();
echo '✅ Test OK: ' . get_class($obj);
?>

We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.

Community Discussion

Ask questions, share tips, or report issues below.