pdphilip/laravel-data-set

Eloquent style management of data sets in Laravel

Fund package maintenance!
PDPhilip

Installs: 2 210

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/pdphilip/laravel-data-set

v0.0.1 2025-10-02 13:25 UTC

This package is auto-updated.

Last update: 2025-11-02 13:36:38 UTC


README

Laravel Data Set

Latest Version on Packagist GitHub Tests Action Status GitHub phpstan Action Status GitHub Code Style Action Status Total Downloads

Eloquent style management of data sets in Laravel

Installation

Add the package via composer:

composer require pdphilip/laravel-data-set

Usage

use PDPhilip\DataSet\DataSet;

$dataSet = new DataSet;

//Add data models
$model = $dataSet->create();
$model->name = 'Alpha';
$model->status = 'active';
$model->hits = 2;
$model->save();

$model2 = $dataSet->create();
$model2->name = 'Bravo';
$model2->status = 'active';
$model2->hits = 15;
$model2->save();

$model3 = $dataSet->create();
$model3->name = 'Charlie';
$model3->status = 'inactive';
$model3->hits = 6;
$model3->save();

$model4 = $dataSet->create();
$model4->name = 'Delta';
$model4->status = 'active';
$model4->hits = 11;
$model4->save();

$dataSet->add([
$model4->name = 'Echo';
$model4->status = 'inactive';
$model4->hits = 5;
]);

//Find
$model = $dataSet->where('name','Charlie')->first()
$models = $dataSet->where('status','active')->get()
$models = $dataSet->where('hits','>',5)->get()
$models = $dataSet->search('Delta')->get()
///.....

//Count
$count = $dataSet->where('hits','>',5)->count() //3

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.