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(10mo ago)12503MITPHPPHP ^8.2|^8.3|^8.4CI passing

Since Sep 16Pushed 10mo 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 today

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

38

—

LowBetter than 83% of packages

Maintenance53

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

326d 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://avatars.githubusercontent.com/u/794216?v=4)[EA](/maintainers/emreakay)[@emreakay](https://github.com/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

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[wnx/laravel-backup-restore

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

213420.9k2](/packages/wnx-laravel-backup-restore)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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