PHPackages                             wyxos/harmonie - 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. wyxos/harmonie

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

wyxos/harmonie
==============

Backend utilities for Laravel and @wyxos/vision

1.6.13(5mo ago)0314MITPHPPHP &gt;=8.1 || ^8.2

Since Jun 26Pushed 5mo ago1 watchersCompare

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

READMEChangelogDependencies (4)Versions (89)Used By (0)

Harmonie
========

[](#harmonie)

Backend utilities for Laravel and @wyxos/vision.

Description
-----------

[](#description)

Harmonie is a comprehensive package that provides a set of utilities to streamline backend development in Laravel applications, especially when working with the @wyxos/vision frontend library. It offers tools for handling data listings, imports, exports, and resource management.

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

[](#requirements)

- PHP 8.1 or higher
- Laravel 11.31+ or 12.0+
- league/csv 9.0+
- laravel/scout 10.6+
- phpoffice/phpspreadsheet 2.2+

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

[](#installation)

You can install the package via composer:

```
composer require wyxos/harmonie
```

The package will automatically register its service providers.

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=harmonie:harmonie-config
```

Features
--------

[](#features)

### Listing

[](#listing)

The Listing component provides a powerful way to handle data listings with filtering, pagination, and formatting. It supports both Eloquent and Scout (search) queries.

Example usage:

```
use Wyxos\Harmonie\Listing\ListingBase;
use Illuminate\Database\Eloquent\Builder;
use Laravel\Scout\Builder as ScoutBuilder;

class UserListing extends ListingBase
{
    public function baseQuery()
    {
        return User::query();
    }

    public function filters(Builder|ScoutBuilder $base)
    {
        $this->whereLike($base, 'search', 'name');
        $this->whereIn($base, 'roles');
        $this->whereRange($base, 'created_at');
    }

    public function filterLabels(): array
    {
        return [
            'search' => 'Search',
            'roles' => 'Roles',
            'created_from' => 'Created From',
            'created_to' => 'Created To',
        ];
    }

    public function load($pagination)
    {
        $pagination->load('roles');
    }
}
```

### Export

[](#export)

The Export component allows you to export data to CSV files with support for chunking large datasets.

Example usage:

```
use Wyxos\Harmonie\Export\ExportBase;
use Illuminate\Database\Eloquent\Builder;

class UserExport extends ExportBase
{
    public function filename($parameters = [])
    {
        return 'users-export-' . now()->format('Y-m-d');
    }

    public function query(array $parameters = []): Builder
    {
        return User::query();
    }

    public function format($row)
    {
        return [
            'ID' => $row->id,
            'Name' => $row->name,
            'Email' => $row->email,
            'Created At' => $row->created_at->format('Y-m-d H:i:s'),
        ];
    }

    public function chunkQuery(): Builder
    {
        return $this->query();
    }
}
```

### Import

[](#import)

The Import component provides functionality for importing data from CSV files with support for validation and error handling.

### Resource

[](#resource)

The Resource component extends Laravel's resource functionality with additional features for API development.

### Commands

[](#commands)

Harmonie includes several useful Artisan commands:

- `php artisan harmonie:clear-all-cache` - Clears various cache types
- `php artisan harmonie:flush-redis` - Clears Redis cache
- `php artisan harmonie:generate-administrator` - Creates an admin user
- `php artisan harmonie:scout-reset` - Resets Laravel Scout indexes
- `php artisan harmonie:make-model` - Custom model generator
- `php artisan harmonie:install-git-hook` - Installs a git pre-push hook that runs tests
- `php artisan harmonie:uninstall-git-hook` - Uninstalls the git pre-push hook

License
-------

[](#license)

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

Credits
-------

[](#credits)

- [Wyxos](https://github.com/wyxos)

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance71

Regular maintenance activity

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~10 days

Recently: every ~35 days

Total

88

Last Release

166d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.1

v1.5.9PHP &gt;=8.1 || ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23614232?v=4)[Wyxos](/maintainers/wyxos)[@wyxos](https://github.com/wyxos)

---

Top Contributors

[![wyxos](https://avatars.githubusercontent.com/u/23614232?v=4)](https://github.com/wyxos "wyxos (108 commits)")[![joeyj87](https://avatars.githubusercontent.com/u/24319731?v=4)](https://github.com/joeyj87 "joeyj87 (54 commits)")

### Embed Badge

![Health badge](/badges/wyxos-harmonie/health.svg)

```
[![Health](https://phpackages.com/badges/wyxos-harmonie/health.svg)](https://phpackages.com/packages/wyxos-harmonie)
```

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[firefly-iii/data-importer

Firefly III Data Import Tool.

7545.8k](/packages/firefly-iii-data-importer)[blair2004/nexopos

The Free Modern Point Of Sale System build with Laravel, TailwindCSS and Vue.js.

1.2k2.3k](/packages/blair2004-nexopos)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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