bidhan/laravel-db-manager

Advance Laravel Database Manager

v1.0.0 2024-06-09 10:18 UTC

This package is auto-updated.

Last update: 2024-09-11 12:15:45 UTC


README

Latest Version on Packagist Total Downloads License

Advance Laravel Database Manager for managing your database schemas with ease. 🚀

Installation 📦

You can install the package via Composer:

composer require bidhan/laravel-db-manager

To copy the command, click on the code block above, select the text, and copy it.

Usage 🛠️

Service Provider

The package will automatically register the service provider. If you need to register it manually, add the service provider to the providers array in config/app.php:

'providers' => [
    // Other Service Providers

    Bidhan\Bhadhan\BidhanDBManagerServiceProvider::class,
],

Configuration

You can publish the configuration file with:

php artisan vendor:publish --provider="Bidhan\Bhadhan\BidhanDBManagerServiceProvider" --tag="config"

Example

Here is an example of how to use the package:

GOTO bhadhan/dashboard URI To Preview Dashboard

Advanced Usage

Get All Database Tables

use Bidhan\Bhadhan\Services\BhadhanDBManagerService\BhadhanDBManagerService;

$allTables = (new BhadhanDBManagerService())->getAllDbTables();

Get Primary Key of a Table

use Bidhan\Bhadhan\Services\BhadhanDBManagerService\BhadhanDBManagerService;

$primaryKey = (new BhadhanDBManagerService())->getPrimaryKey('tableName');

Get Foreign Keys

use Bidhan\Bhadhan\Services\BhadhanDBManagerService\BhadhanDBManagerService;

$foreignKeys = (new BhadhanDBManagerService())->getForeignKeys();

Get All Tables with Size

use Bidhan\Bhadhan\Services\BhadhanDBManagerService\BhadhanDBManagerService;

$tablesWithSize = (new BhadhanDBManagerService())->getAllTableWithSize();

Get Current Schema Size

use Bidhan\Bhadhan\Services\BhadhanDBManagerService\BhadhanDBManagerService;

$schemaSize = (new BhadhanDBManagerService())->getCurrentSchemaSize();

Get All Database Views

use Bidhan\Bhadhan\Services\BhadhanDBManagerService\BhadhanDBManagerService;

$allViews = (new BhadhanDBManagerService())->getAllDBViews();

Middleware Configuration

If you want to use middleware with this package, feel free to change the bhadhan.php configuration file. Locate the auth_middleware key and add your middleware inside the array.

return [
    // Other configuration settings

    'auth_middleware' => [
        // Add your middleware here
    ],

    // Other configuration settings
];

Features ✨

  • Create and manage database schemas effortlessly.
  • Simple and intuitive API.
  • Supports all major Laravel database features.

License 📝

The MIT License (MIT). Please see License File for more information.

Contributors ✨

Thanks to the following people who have contributed to this project:

Issues and Contributions 🐛

If you encounter any issues, feel free to open an issue on GitHub. Contributions are welcome and appreciated! 🎉

Support 🙌

If you like this package, consider giving it a star ⭐ on GitHub and sharing it with your friends!

Made with ❤️ by Bidhan Baniya