tsrgtm / db-manager
A Laravel package for database visualization and CRUD operations.
Requires
- php: ^8.1.0
- laravel/framework: ^11.31
- livewire/livewire: ^3.5
Requires (Dev)
- fakerphp/faker: ^1.23
- laravel/pint: ^1.13
- mockery/mockery: ^1.6
- phpunit/phpunit: ^11.0.1
This package is auto-updated.
Last update: 2025-04-29 01:28:23 UTC
README
A Laravel package for database visualization and CRUD operations.
Features
- Visualize database tables and their data.
- Perform Create, Read, Update, and Delete (CRUD) operations on the tables.
- Real-time updates with Livewire for a seamless user experience.
Installation
-
Install the package via Composer:
composer require tsrgtm/db-manager
-
Register the Service Provider (if using Laravel < 5.5):
Add the following line to your
config/app.php
file in theproviders
array:Tsrgtm\DbManager\DbManagerServiceProvider::class,
-
Publish the package assets (if needed):
Use the following command to publish the views:
php artisan vendor:publish --provider="Tsrgtm\DbManager\DbManagerServiceProvider"
Usage
Step 1: Add the Livewire Component
You can use the Livewire component in your Blade views. Here’s an example of how to include the DB Manager component in your Blade file:
@extends('layouts.app') @section('content') <div class="container"> @livewire('db-manager') </div> @endsection
Step 2: Accessing the DB Manager
After including the Livewire component, you can access the DB Manager through your application. It will display all database tables and allow you to perform CRUD operations.
CRUD Operations
- View Tables: Select a table from the dropdown to view its contents.
- Edit Rows: Click on a row to edit its data. Make changes and save.
- Delete Rows: Click on the delete button to remove a row from the database.
- Add New Rows: Add new rows directly from the interface.
Requirements
- PHP 8.1 or higher
- Laravel 11.x
- Livewire 3.x
License
This package is licensed under the MIT License. See the LICENSE file for more details.
Contributing
Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.