PHPackages                             hexagonlabsllc/laravel-exports - 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. hexagonlabsllc/laravel-exports

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

hexagonlabsllc/laravel-exports
==============================

Comprehensive export feature that utilizes Laravel's model backbone to create customizable exports.

v1.0.0-rc.3(4mo ago)045MITPHPPHP ^8.1

Since Jun 26Pushed 2mo agoCompare

[ Source](https://github.com/HexagonLabsLLC/laravel-exports)[ Packagist](https://packagist.org/packages/hexagonlabsllc/laravel-exports)[ Docs](https://github.com/HexagonLabsLLC/laravel-exports)[ RSS](/packages/hexagonlabsllc-laravel-exports/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (12)Versions (4)Used By (0)

Laravel Exports
===============

[](#laravel-exports)

A powerful, database-driven export system for Laravel applications that provides dynamic, configurable exports without writing code.

Features
--------

[](#features)

- **Database-Driven Configuration** - Define exports through database records, not code
- **Dynamic Model Discovery** - Auto-import Eloquent models and their relationships
- **Advanced Filtering** - Static filters, request-based filters, and collection filters
- **Nested Relationship Support** - Export deeply nested data using dot notation
- **Pivot Table Data** - Access BelongsToMany pivot attributes via `.pivot.` notation
- **Transformation Functions** - 22 built-in functions for formatting dates, strings, numbers
- **Aggregations** - Sum, count, average, min, max, first, last on collections
- **Large Dataset Support** - Chunking, streaming, and background job processing
- **Multiple Formats** - CSV and JSON out of the box, extensible for more

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

[](#documentation)

Full documentation is available in the [docs](docs/index.md) directory:

- [Getting Started](docs/getting-started.md) - Installation and setup
- [Configuration](docs/configuration.md) - All configuration options
- [Guides](docs/guides/) - In-depth guides for each feature
- [Examples](docs/examples/) - Practical examples from basic to advanced
- [API Reference](docs/reference/api.md) - Complete class and method documentation
- [Troubleshooting](docs/troubleshooting.md) - Common issues and solutions

Quick Start
-----------

[](#quick-start)

### Installation

[](#installation)

```
composer require hexagonlabsllc/laravel-exports
```

### Setup

[](#setup)

```
# Publish configuration and migrations
php artisan vendor:publish --provider="HexagonLabsLLC\LaravelExports\LaravelExportsServiceProvider"

# Run migrations
php artisan migrate

# Import your models with relationships
php artisan export:import-models --deep

# Seed transformation functions
php artisan export:seed-functions
```

### Basic Usage

[](#basic-usage)

```
use HexagonLabsLLC\LaravelExports\Models\{ExportModel, ExportLayout, ExportColumn};
use HexagonLabsLLC\LaravelExports\Services\DynamicExportService;

// 1. Create an export layout
$userModel = ExportModel::where('title', 'User')->first();
$layout = ExportLayout::create([
    'export_model_id' => $userModel->id,
    'title' => 'User Export',
]);

// 2. Define columns
ExportColumn::create([
    'export_layout_id' => $layout->id,
    'title' => 'Name',
    'value_path' => 'name',
    'position' => 1,
]);

ExportColumn::create([
    'export_layout_id' => $layout->id,
    'title' => 'Email',
    'value_path' => 'email',
    'position' => 2,
]);

// 3. Export data
$service = new DynamicExportService();
return $service->downloadAs($layout, 'csv', 'users.csv');
```

### Related Data

[](#related-data)

Export data from relationships using dot notation:

```
ExportColumn::create([
    'export_layout_id' => $layout->id,
    'title' => 'Department',
    'value_path' => 'department.name',
    'position' => 3,
]);
```

### Request-Based Filtering

[](#request-based-filtering)

Add dynamic filters controlled by request parameters:

```
ExportFilter::create([
    'export_layout_id' => $layout->id,
    'export_model_relation_id' => $statusRelation->id,
    'operator' => '=',
    'is_request' => true,
]);

// In your controller
$service->downloadAs($layout, 'csv', 'users.csv', [
    'status' => 'active',
]);
```

### Large Datasets

[](#large-datasets)

For large exports, use streaming or background jobs:

```
// Streaming
return $service->streamAs($layout, 'csv', 'large.csv', [], [], 1000);

// Background job
$exportId = $service->queueExport($layout, 'csv');
$status = ProcessExportJob::getStatus($exportId);
```

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 12.0+
- Database with UUID support

Learn More
----------

[](#learn-more)

See the [full documentation](docs/index.md) for:

- [Nested Relationships](docs/guides/nested-relationships.md) - Deep data traversal
- [Pivot Tables](docs/guides/pivot-tables.md) - BelongsToMany pivot data
- [Transformation Functions](docs/guides/transformation-functions.md) - All 22 functions
- [Aggregations](docs/guides/aggregations.md) - Collection aggregation
- [Large Datasets](docs/guides/large-datasets.md) - Performance optimization
- [Background Jobs](docs/examples/large-scale/background-jobs.md) - Queue processing

License
-------

[](#license)

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

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance80

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Every ~85 days

Total

3

Last Release

149d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/52399614f0bcf7edd25ddc08c873024218d11fc93c8832cad8605046e0e928b1?d=identicon)[HexLabs](/maintainers/HexLabs)

---

Top Contributors

[![ImSeaWorld](https://avatars.githubusercontent.com/u/20188588?v=4)](https://github.com/ImSeaWorld "ImSeaWorld (45 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/hexagonlabsllc-laravel-exports/health.svg)

```
[![Health](https://phpackages.com/badges/hexagonlabsllc-laravel-exports/health.svg)](https://phpackages.com/packages/hexagonlabsllc-laravel-exports)
```

###  Alternatives

[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[illuminate/broadcasting

The Illuminate Broadcasting package.

7126.5M178](/packages/illuminate-broadcasting)[illuminate/redis

The Illuminate Redis package.

8314.0M314](/packages/illuminate-redis)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)

PHPackages © 2026

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