internetguru / laravel-model-browser
A Laravel package to browse models and show them in a table, autocmplete, etc.
Installs: 2 297
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/internetguru/laravel-model-browser
Requires
- php: ^8.4
- internetguru/laravel-common: ^1 || ^2 || ^3 || ^4
- laravel/framework: ^9.0 || ^10.0 || ^11.0
- livewire/livewire: ^3.5
Requires (Dev)
- internetguru/laravel-common: ^1 || ^2 || ^3 || ^4
- laravel/pint: ^1.17
- livewire/livewire: ^3.5
- orchestra/testbench: ^9.5
- phpunit/php-code-coverage: ^11.0
- dev-main
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- v1.4.1
- v1.4.0
- v1.3.0
- v1.2.0
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v0.12.2
- v0.12.1
- v0.12.0
- v0.11.0
- v0.10.0
- v0.9.0
- v0.8.6
- v0.8.5
- v0.8.4
- v0.8.3
- v0.8.2
- v0.8.1
- v0.8.0
- v0.7.0
- v0.6.5
- v0.6.4
- v0.6.3
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.5
- v0.5.4
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.8
- v0.4.7
- v0.4.6
- v0.4.5
- v0.4.4
- v0.4.3
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.0
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.0
- dev-dev
- dev-main-2
- dev-staging
- dev-main-1
- dev-main-0
This package is auto-updated.
Last update: 2026-01-25 20:55:47 UTC
README
A Laravel package to browse models and show them in cards, tables, etc.
| Branch | Status | Code Coverage |
|---|---|---|
| Main | ||
| Staging | ||
| Dev |
Installation
-
Install the package via Composer:
# First time installation composer require internetguru/laravel-model-browser # For updating the package composer update internetguru/laravel-model-browser
-
Optionally publish the views and translations:
php artisan vendor:publish --tag=views --provider="Internetguru\ModelBrowser\ModelBrowserServiceProvider" php artisan vendor:publish --tag=translations --provider="Internetguru\ModelBrowser\ModelBrowserServiceProvider" # If you want to publish everything, you can use the `--provider` option: php artisan vendor:publish --provider="Internetguru\ModelBrowser\ModelBrowserServiceProvider"
Run Tests Locally
In Visual Studio Code you can simpy use Ctrl+Shift+B to run the tests.
To run the tests manually, you can use the following commands:
# Build the Docker image docker build -t laravel-model-browser-test . # Run the tests docker run --rm laravel-model-browser-test # Both steps combined docker build -t laravel-model-browser-test . && docker run --rm laravel-model-browser-test
Basic Usage
-
Show the model browser in your views:
<!-- Show the model browser in base view (cards) --> <livewire:base-model-browser model="App\Models\User" /> <!-- Show the model browser in a table --> <livewire:table-model-browser model="App\Models\User" />
Advanced Options
When using the TableModelBrowser component, you can customize its behavior by passing additional parameters.
Here are the advanced options you can use:
-
model: The model class to be used for browsing. Optionally, you can specify a method to be called on the model.model="App\Models\User" // or model="App\Models\User@summary"
-
filterAttributes: An array of attributes that can be used to filter the data.:filterAttributes="['created_at', 'name', 'email', 'last_login', 'last_activity', 'is_active']"
-
viewAttributes: An array of attributes that will be displayed in the table, with their corresponding translations used as labels.:viewAttributes="[ 'created_at' => __('summary.created_at'), 'name' => __('summary.name'), 'email' => __('summary.email'), 'last_login' => __('summary.last_login'), 'last_activity' => __('summary.last_activity'), 'is_active' => __('summary.is_active'), ]" -
formats: An array of formatting functions for the attributes. You can specify a single function name or an array withupanddownkeys.:formats="[ 'created_at' => [ 'up' => 'formatDateTime', 'down' => 'globalFormatDown', ], 'name' => 'formatUserDetailLink', 'email' => 'formatEmailLink', 'last_login' => [ 'up' => 'formatDateTime', 'down' => 'globalFormatDown', ], 'last_activity' => [ 'up' => 'formatDateTime', 'down' => 'globalFormatDown', ], 'is_active' => [ 'up' => 'formatBoolean', 'down' => 'formatBooleanDown', ], ]" -
alignments: An array of alignment settings for the attributes. You can specifystart,end, orcenter.:alignments="[ 'created_at' => 'start', 'last_activity' => 'end', 'is_active' => 'center', ]" -
lightDarkStep: An integer value to control the light/dark step for table rows. It is used only for the table layout.:lightDarkStep="2"
License & Commercial Terms
Open Source License
Copyright © 2026 Internet Guru
This software is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.
Disclaimer: This software is provided "as is", without warranty of any kind, express or implied. In no event shall the authors or copyright holders be liable for any claim, damages or other liability.
Commercial Use
The standard CC BY-NC-SA license prohibits commercial use. If you wish to use this software in a commercial environment or product, we offer flexible commercial licenses tailored to:
- Your company size.
- The nature of your project.
- Your specific integration needs.
Note: In many instances (especially for startups or small-scale tools), this may result in no fees being charged at all. Please contact us to obtain written permission or a commercial agreement.
Contact for Licensing: info@internetguru.io
Professional Services
Are you looking to get the most out of this project? We are available for:
- Custom Development: Tailoring the software to your specific requirements.
- Integration & Support: Helping your team implement and maintain the solution.
- Training & Workshops: Seminars and hands-on workshops for your developers.
Reach out to us at info@internetguru.io — we are more than happy to assist you!