PHPackages                             stianscholtz/query-exporter - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. stianscholtz/query-exporter

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

stianscholtz/query-exporter
===========================

A Laravel package to export queries to csv.

0.0.3(1y ago)1551MITPHPPHP &gt;=8.0

Since Apr 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/stian-scholtz/query-exporter)[ Packagist](https://packagist.org/packages/stianscholtz/query-exporter)[ Docs](https://github.com/stian-scholtz/query-exporter)[ RSS](/packages/stianscholtz-query-exporter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (1)

Laravel Query Exporter
======================

[](#laravel-query-exporter)

Laravel Query Exporter is a handy utility package for Laravel applications that allows you to easily export query results to CSV files. It provides a simple and flexible interface to streamline the process of exporting database query results.

Features
--------

[](#features)

- Export query results to CSV files effortlessly.
- Customize file name and headers for exported CSV files.
- Seamless integration with Laravel's query builder via the DB Facade or Eloquent Models.

Installation
------------

[](#installation)

You can install the Laravel Query Exporter via Composer. Run the following command in your terminal:

```
composer require stianscholtz/query-exporter

```

Usage
-----

[](#usage)

Using the Laravel Query Exporter is straightforward:

```
use Stianscholtz\QueryExporter\QueryExporter;
use DB;

$query = DB::table('your_table')
            ->select('column1', 'column2')
            ->where('condition', 'value');

QueryExporter::forQuery($query)
    ->filename('my-file')
    ->headers(['Column 1', 'Column 2'])//Optional, selected columns in query will be used as default headers.
    ->export();
```

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

[](#contributing)

Contributions are welcome! Please feel free to submit a pull request.

License
-------

[](#license)

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

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance47

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity38

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 ~183 days

Total

3

Last Release

396d ago

PHP version history (2 changes)0.0.1PHP ~8.1.0|~8.2.0|~8.3.0

0.0.3PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0774550d0655ba034a6ec17044f16ce3da0c94c23bf788e95b83a3b25210df21?d=identicon)[Stian-Scholtz](/maintainers/Stian-Scholtz)

---

Top Contributors

[![stian-scholtz](https://avatars.githubusercontent.com/u/30631131?v=4)](https://github.com/stian-scholtz "stian-scholtz (1 commits)")

---

Tags

laravelexportcsvStian-Scholtz

### Embed Badge

![Health badge](/badges/stianscholtz-query-exporter/health.svg)

```
[![Health](https://phpackages.com/badges/stianscholtz-query-exporter/health.svg)](https://phpackages.com/packages/stianscholtz-query-exporter)
```

###  Alternatives

[maatwebsite/excel

Supercharged Excel exports and imports in Laravel

12.7k144.3M710](/packages/maatwebsite-excel)[bfinlay/laravel-excel-seeder

Seed the database with Laravel using Excel, XLSX, XLS, CSV, ODS, Gnumeric, XML, HTML, SLK files

3944.4k](/packages/bfinlay-laravel-excel-seeder)

PHPackages © 2026

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