onecentlin / laravel-adminer

Adminer database manager for Laravel 5+
MIT License
243 stars 45 forks source link

Adminer plugins support #26

Closed tonymorello closed 7 months ago

tonymorello commented 1 year ago

Since I have used SQLite in my last project, I needed to use the password-less plugin. Given that there was already a request in the issues for plugin support I took the liberty of implementing it.

Thank you for the package

philharmonie commented 11 months ago

How to use it?

tonymorello commented 11 months ago

Installation is the same as the original package. The vendor:publish action will generate a resources/plugins folder and add a new plugins entry in config/adminer.php. Just place your plugin files in the plugins folder and add the plugins you want to enable in the config file.

philharmonie commented 11 months ago

I added the passwordless plugin but password is still required. Not sure what I need to pass as password_hash

tonymorello commented 11 months ago

Sorry, I made a mistake. The folder for the plugin files is actually resources/adminer/plugins

As for password_hash this is what I have used

        'AdminerLoginPasswordLess' => [
            password_hash(env('DB_PASSWORD'), PASSWORD_DEFAULT),
        ],

Where DB_PASSWORD is defined in my .env file and PASSWORD_DEFAULT can be anything you want as it is only used as a fallback value.

To be clear, you will still need to enter the password (from the .env file) to login into the DB even if the database itself does not require one