PHPackages                             aurorawebsoftware/flymodel - 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. [Database &amp; ORM](/categories/database)
4. /
5. aurorawebsoftware/flymodel

ActiveLibrary[Database &amp; ORM](/categories/database)

aurorawebsoftware/flymodel
==========================

Laravel Models on the FLY !

12.0.0(9mo ago)12503MITPHPPHP ^8.2|^8.3|^8.4CI passing

Since Sep 16Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/AuroraWebSoftware/FlyModel)[ Packagist](https://packagist.org/packages/aurorawebsoftware/flymodel)[ Docs](https://github.com/aurorawebsoftware/flymodel)[ GitHub Sponsors](https://github.com/AuroraWebSoftware)[ RSS](/packages/aurorawebsoftware-flymodel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (14)Versions (5)Used By (0)

FlyModel: Dynamic Laravel Models on the Fly
===========================================

[](#flymodel-dynamic-laravel-models-on-the-fly)

FlyModel is a Laravel package that empowers you to create and manage models dynamically, **on the fly !**.

It allows to define flexible and customizable models and model fields **without needing to change** the database schema.

This package streamlines your workflow by eliminating the need to define models explicitly in your codebase. Instead, you can generate and interact with models as needed, based on a unique "deck" identifier.

The package uses **FlexyField** Package as Dynamic Field Engine.

For More Info Visit:

🚀 Features
----------

[](#-features)

- **Dynamic Model Creation**: Instantiate models with a specified "deck" identifier without pre-defining them.
- **Dynamic Fields** : Define flexible and customizable fields on models **without needing to change** the database schema.
- **Automatic Scoping**: Models are automatically scoped according to the deck, ensuring data isolation.
- **Seamless Integration**: Works effortlessly with Laravel’s Eloquent ORM.

📦 Installation
--------------

[](#-installation)

To get started with FlyModel, follow these steps:

### Install the Package

[](#install-the-package)

Add FlyModel to your project using Composer:

```
composer require aurorawebsoftware/flymodel
```

### Run the Migration

[](#run-the-migration)

Create the necessary database table for storing fly models:

```
php artisan migrate
```

📘 Usage
-------

[](#-usage)

### Creating and Using Fly Models

[](#creating-and-using-fly-models)

With FlyModel, you can dynamically create models and perform various operations. Here’s how:

Instantiate a Model with a Deck

```
$building = FlyModel::of('building');
```

Save the Model if not saved or created before

```
$building->save();
```

Perform Field Operations

```
$building->flexy->name = 'Headquarter Building'
$building->flexy->address = 'Ali Pasha Ave. number 10';
$building->flexy->city = 'İstanbul';
$building->flexy->floor = 7;
$building->flexy->area = 313;
$building->flexy->active = true;

$building->save();
```

Perform Eloquent Operations

```
$buildings = FlyModel::of('building')->all();

$istanbulBuildings = FlyModel::of('building')
                        ->where('flexy_city', 'İstanbul')
                        ->get();

$largeBuildings = FlyModel::of('building')
                    ->where('flexy_area', '>' 500)
                    ->orderBy('flexy_area')
                    ->get();

$highBuildingsInIstanbul = FlyModel::of('building')
                            ->where('flexy_floor', '>' 10)
                            ->where('flexy_city', 'İstanbul')
                            ->get();
```

🧪 Testing
---------

[](#-testing)

FlyModel integrates with Laravel’s testing environment. Here’s an example of how to write tests for it:

💬 Contributing
--------------

[](#-contributing)

We welcome contributions to improve FlyModel!

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance58

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Total

3

Last Release

280d ago

Major Versions

1.1.0 → 12.0.02025-08-11

PHP version history (2 changes)1.0.0PHP ^8.2

12.0.0PHP ^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/e79935c219efe1a3132a4c9f2b87da38268fccacfcb43c453275ceafdd1ed23f?d=identicon)[emreakay](/maintainers/emreakay)

---

Top Contributors

[![emreakay](https://avatars.githubusercontent.com/u/794216?v=4)](https://github.com/emreakay "emreakay (9 commits)")

---

Tags

databaselaravelmodellaravelAuroraWebSoftwareflymodel

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/aurorawebsoftware-flymodel/health.svg)

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

###  Alternatives

[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[spatie/laravel-model-flags

Add flags to Eloquent models

4301.1M1](/packages/spatie-laravel-model-flags)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[spatie/laravel-sql-commenter

Add comments to SQL queries made by Laravel

1931.4M1](/packages/spatie-laravel-sql-commenter)[spatie/laravel-deleted-models

Automatically copy deleted records to a separate table

409109.8k4](/packages/spatie-laravel-deleted-models)[wnx/laravel-backup-restore

A package to restore database backups made with spatie/laravel-backup.

203330.1k2](/packages/wnx-laravel-backup-restore)

PHPackages © 2026

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