PHPackages                             onelearningcommunity/laravel-model-explorer - 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. onelearningcommunity/laravel-model-explorer

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

onelearningcommunity/laravel-model-explorer
===========================================

Developer tools to explore your Laravel models.

v0.2.1(3mo ago)61.1k↑216%[1 PRs](https://github.com/One-Learning-Community/laravel-model-explorer/pulls)MITPHPPHP ^8.3CI passing

Since Mar 24Pushed 6d agoCompare

[ Source](https://github.com/One-Learning-Community/laravel-model-explorer)[ Packagist](https://packagist.org/packages/onelearningcommunity/laravel-model-explorer)[ Docs](https://github.com/one-learning-community/laravel-model-explorer)[ RSS](/packages/onelearningcommunity-laravel-model-explorer/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (2)Dependencies (22)Versions (3)Used By (0)

Laravel Model Explorer
======================

[](#laravel-model-explorer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f419ed1e280b3441efd7db7840bd0f0b973f2105eda6efa523650d98e04b0667/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6e656c6561726e696e67636f6d6d756e6974792f6c61726176656c2d6d6f64656c2d6578706c6f7265722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/onelearningcommunity/laravel-model-explorer)[![GitHub Tests Action Status](https://camo.githubusercontent.com/0e1762c3e2a658f3f596977d547814ddd1cddc4d56a0bdf6ffe3bc3308fd1457/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6f6e652d6c6561726e696e672d636f6d6d756e6974792f6c61726176656c2d6d6f64656c2d6578706c6f7265722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/one-learning-community/laravel-model-explorer/actions?query=workflow%3Arun-tests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/86ecacb0ad76caf0ae94136497228bf9cf910e20e0c3785e567f38b5d6927278/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f6e656c6561726e696e67636f6d6d756e6974792f6c61726176656c2d6d6f64656c2d6578706c6f7265722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/onelearningcommunity/laravel-model-explorer)

A developer tool for Laravel that gives you a browsable UI to explore your Eloquent models — their attributes, casts, relations, scopes, traits, and live data — without reading code.

**Zero setup beyond Composer install.** No `vendor:publish`, no frontend tooling required in your application.

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

[](#requirements)

- PHP 8.4+
- Laravel 11, 12, or 13

Features
--------

[](#features)

- **Model list** — searchable grid of all discovered Eloquent models
- **Model detail** — DB columns, casts, fillable/hidden/guarded, relations with type badges and foreign keys, scopes with source snippets, traits, and accessor snippets
- **Record lookup** — find any record by primary key or unique field; browse raw attributes, lazy-loaded accessor values, and expandable relations with drill-down navigation and breadcrumb trail
- **Relationship graph** — interactive force-directed SVG graph of all model relationships

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

[](#installation)

```
composer require --dev onelearningcommunity/laravel-model-explorer
```

The package auto-registers via Laravel's package discovery — no additional setup required.

Usage
-----

[](#usage)

Visit `/_model-explorer` in your application. In local environments, access is granted by default.

Authorization
-------------

[](#authorization)

Access is controlled by the `viewModelExplorer` gate, which defaults to allowing access in `local` environments only. Override it in your `AuthServiceProvider` to control access elsewhere:

```
Gate::define('viewModelExplorer', function (User $user): bool {
    return $user->isAdmin();
});
```

To disable the explorer entirely regardless of the gate, set the environment variable:

```
MODEL_EXPLORER_ENABLED=false
```

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

[](#configuration)

Publish the config file to customise behaviour:

```
php artisan vendor:publish --tag="model-explorer-config"
```

```
return [
    // Set to false to disable entirely (e.g. force off in production regardless of gate)
    'enabled' => env('MODEL_EXPLORER_ENABLED', true),

    // URL prefix for all Model Explorer routes
    'path' => env('MODEL_EXPLORER_PATH', '_model-explorer'),

    // Middleware applied to all routes ('web' is required)
    'middleware' => ['web'],

    // Directories scanned for Eloquent models (add more for DDD layouts, packages, etc.)
    // Keys are the root namespace, values are absolute directory paths.
    'model_paths' => [
        'App'             => app_path(),
        // 'Domain\\Billing' => base_path('src/Billing'),
    ],

    // Traits whose FQN begins with these prefixes will be hidden in the UI
    'excluded_trait_prefixes' => [
        'Illuminate\Database\Eloquent\Concerns\\',
        'Illuminate\Database\Eloquent\HasCollection',
        'Illuminate\Support\Traits\\',
    ],
];
```

Security
--------

[](#security)

Laravel Model Explorer is intended for development use. The `viewModelExplorer` gate should prevent access in production environments.

All record reads are wrapped in a rolled-back transaction with `Model::withoutEvents()` to prevent accidental writes from observers or model events. Note that non-database side effects from accessor methods (HTTP calls, cache writes, queue pushes) are **not** prevented.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

License
-------

[](#license)

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

###  Health Score

44

—

FairBetter than 91% of packages

Maintenance91

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.3% 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 ~0 days

Total

2

Last Release

92d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b5b0aa19e00a04418b0f4472c3d9020460de899517c52ead5308d0aec0ac0a49?d=identicon)[dan-onelearningcommunity](/maintainers/dan-onelearningcommunity)

---

Top Contributors

[![serpentblade](https://avatars.githubusercontent.com/u/1483665?v=4)](https://github.com/serpentblade "serpentblade (67 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

eloquenteloquent-orm-modelslaravellaraveleloquentmodelsdeveloper-tools

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/onelearningcommunity-laravel-model-explorer/health.svg)

```
[![Health](https://phpackages.com/badges/onelearningcommunity-laravel-model-explorer/health.svg)](https://phpackages.com/packages/onelearningcommunity-laravel-model-explorer)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.3M42](/packages/spatie-laravel-pdf)[wnx/laravel-backup-restore

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

213389.8k2](/packages/wnx-laravel-backup-restore)[spatie/laravel-model-flags

Add flags to Eloquent models

4471.2M4](/packages/spatie-laravel-model-flags)[clickbar/laravel-magellan

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

438834.4k1](/packages/clickbar-laravel-magellan)[lacodix/laravel-model-filter

A Laravel package to filter, search and sort models with ease while fetching from database.

17555.1k](/packages/lacodix-laravel-model-filter)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

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

PHPackages © 2026

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