PHP Classes

How to Impelement a PHP Admin Panel to Manage SQL Databases Using a Separate Use Authentication Jaxon DB Admin: Web application to manage SQL of databases

Recommend this page to a friend!
  Info   Documentation   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2025-10-25 (4 hours ago) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
jaxon-dbadmin 0.1BSD License8Databases, Systems administration, PHP 8
Description 

Author

This package provides a Web application to manage SQL of databases.

It combines several packages to implement a Web application that allows the users to perform several types of database management operations:

Currently it can:

- Log database queries

- Show a detailed log of the queries that were performed

- Execute database table queries

- Restrict the access to this application to authenticated users registered with its own user authentication service

Innovation Award
PHP Programming Innovation award nominee
September 2025
Nominee
Vote
Many PHP applications use SQL databases to store information that needs to be used over time to let users perform the actions they want to perform with those applications.

A Web based application to manage the database is useful for developers that want to perform different types of database management operations using a visual interface.

This package implements a Web based database management application that authenticates users with its own database of users authorized to access the application.

Manuel Lemos
Picture of Thierry Feuzeu
  Performance   Level  
Name: Thierry Feuzeu is available for providing paid consulting. Contact Thierry Feuzeu .
Classes: 15 packages by
Country: Cameroon Cameroon
Age: 49
All time rank: 21621 in Cameroon Cameroon
Week rank: 195 Up1 in Cameroon Cameroon Equal
Innovation award
Innovation award
Nominee: 2x

Instructions

Documentation

A web-based database management tool

Jaxon DbAdmin is a database admin dashboard with multiple DBMS support, and a custom and extensible authentication system.

Features ? Installation ? Docker ? Authentication ? Configuration ? Query logs

screenshot

About Jaxon DbAdmin

Jaxon DbAdmin is built with Jaxon, Laravel and Bootstrap 5.

It currently supports 3 database servers: PostgreSQL, MySQL (and MariaDB), and SQLite.

Unlike other database management tools, Jaxon DbAdmin uses the Laravel authentication system instead of the database servers credentials to authenticate the application users.

The database access code (and thus the provided features) originates from Adminer.

Features and current status

This application and the related packages are still being actively developed, and the provided features are still basic and need improvements.

The following features are currently available: - Browse servers and databases. - Show tables and views details. - Query a table. - Query a view. - Execute queries in the query editor. - Use a better editor for SQL queries. - Save and show the query history. - Save user favorite queries.

The following features are either disabled or not yet implemented: - Navigate through related tables. - Create, alter or drop a database, table or view. - Insert, modify or delete data in a table. - Import or export data. - Code completion for table and field names in the SQL editor.

Installation

As a Laravel and PHP application, Jaxon DbAdmin needs to be installed with Composer.

Install from Packagist.

composer create-project lagdo/dbadmin-app dbadmin

Install from Github.

git clone https://github.com/lagdo/dbadmin-app dbadmin
cd dbadmin
composer install
composer run post-root-package-install
composer run post-create-project-cmd

By default, Jaxon DbAdmin stores the user credentials in a database. An SQLite database located at database/database.sqlite will be created and migrated during the installation. A different database can be used. In this case, the .env and config/database.php file must be updated accordingly. See the Laravel database documention for more information.

The last step is to configure a web server to give access to the application directory, with the public subdir as index.

The database servers to be managed are listed in a config file, whose location and content are described in the Database access configuration section below.

Running with Docker

The Jaxon DbAdmin application can also be started with Docker.

docker run --rm --publish 8080:8080 --volume ./config/dbadmin.json:/var/www/config/dbadmin.json lagdo/jaxon-dbadmin:latest

or

docker run --rm -p 8080:8080 -v ./config/dbadmin.json:/var/www/config/dbadmin.json lagdo/jaxon-dbadmin:latest

In a docker-compose.yml file.

  dbadmin:
    container_name: dbadmin
    image: lagdo/jaxon-dbadmin:latest
    volumes:
      - ./config/dbadmin.json:/var/www/config/dbadmin.json
    ports:
      - 8080:8080

The content of the config/dbadmin.json config file is described in the Database access configuration section below.

User management and authentication

Unlike other database management tools, Jaxon DbAdmin does not use the database server credentials to authenticate the application users.

The user authentication is a separate process, which in this case is provided by the Laravel framework.

By default, the user accounts and credentials are stored in the application database (different from the managed databases), and by default a fresh Laravel installation will create and migrate an SQLite database located in the database/database.sqlite file. The application database can be changed in the Laravel database configuration.

Jaxon DbAdmin provides a CLI command to create user accounts in its database. It is executed from the application install dir.

php artisan user:create --name <user name> --email <user email>

If the --name and --email are not provided, the CLI command will ask for them. It will then ask to provide and confirm the user password, and if all the inputs are valid, the user account will be created.

Thanks to Laravel, more advanced authentication systems can be implemented quite easily. For example, Jaxon DbAdmin can be setup to authenticate its users on a company SSO service.

Database access configuration

Jaxon DbAdmin supports 3 file formats for its database access configuration options: json, yaml and php.

It will successively look for the config/dbadmin.json, config/dbadmin.yaml, config/dbadmin.yml and config/dbadmin.php, and loads the first it will find. It will then parse the content of the config file, and return the options specific to the authenticated user.

This is an example of a json config file.

{
    "common": {
        "access": {
            "server": false,
            "system": false
        },
        "servers": {
            "db-postgresql": {
                "driver": "pgsql",
                "name": "PostgreSQL 14",
                "host": "env(DBA_PGSQL_HOST)",
                "port": "env(DBA_PGSQL_PORT)"
            },
            "db-mariadb": {
                "driver": "mysql",
                "name": "MariaDB 10",
                "host": "env(DBA_MARIA_HOST)",
                "port": "env(DBA_MARIA_PORT)"
            },
            "db-mysql": {
                "driver": "mysql",
                "name": "MySQL 8",
                "host": "env(DBA_MYSQL_HOST)",
                "port": "env(DBA_MYSQL_PORT)"
            }
        }
    },
    "fallback": {},
    "users": [{
        "id": {
            "users": [
                "[email protected]",
                "[email protected]"
            ]
        },
        "servers": {
            "db-postgresql": {
                "username": "env(DBA_PGSQL_USERNAME)",
                "password": "env(DBA_PGSQL_PASSWORD)"
            },
            "db-mysql": {
                "username": "env(DBA_MYSQL_USERNAME)",
                "password": "env(DBA_MYSQL_PASSWORD)"
            },
            "laravel": {
                "driver": "sqlite",
                "name": "Laravel",
                "directory": "env(SQLITE_LARAVEL_DIR)"
            }
        }
    }, {
        "id": {
            "user": "[email protected]"
        },
        "access": {
            "server": true,
            "system": true
        },
        "servers": {
            "db-mariadb": {
                "username": "env(DBA_MARIA_USERNAME)",
                "password": "env(DBA_MARIA_PASSWORD)"
            },
            "db-mysql": {
                "username": "env(DBA_MYSQL_USERNAME)",
                "password": "env(DBA_MYSQL_PASSWORD)"
            },
            "sqlite-3": {
                "driver": "sqlite",
                "name": "Sqlite 3",
                "directory": "env(SQLITE_DEFAULT_DIR)"
            }
        }
    }]
}

The Jaxon DbAdmin config file can contain 3 sections, all of which are optional.

The common section

This section contains options that are shared for all users. The options in this section will be merged with the user options found. Which also means that if no entry is found for the user, these options are not returned.

The fallback section

The options in this section will be returned if no specific entry exists for the authenticated user in the users section.

These options will be merged with the common options.

The users section

This section must contain an array of options, each for a given user or group of users.

Each entry in the array must have an attribute with id key, which itself is an object with 4 possible attributes to identify the corresponding users: - user: a single user email. - users: an array of user emails. - role: a single user role. - roles: an array of user roles.

The other attributes are the database options, described in the following paragraph.

If any entry is found here for the current user, its value will be merged with the common options.

The database options

The common, fallback and each entry in users array contain the same options, excepted the id option in the servers array items.

The servers option

The servers option lists the database servers to be managed.

For each entry, the key is the unique identifier used in requests to the Jaxon DbAdmin application. The driver option indicate the corresponding DBMS: pgsql for PostgreSQL, mysql for MySQL or MariaDB, and sqlite for SQLite. The name option is the name to be displayed in the application UI.

The other options depend on the DBMS.

For SQLite, the directory option is a directory where to look for database files. Each file in the directory with the db, sdb or sqlite extension is listed as a database.

For the other DBMS, the host, port, username and password options will be used to connect to the database server. Only the port option optional.

Except for driver and name, the values for all the other options can be loaded from env vars. In this case, the option need to be set in a specific format like env(DBA_PGSQL_HOST), where the value in the parenthesis is the env var name.

In addition to the default .env, the application also loads the .env.dbadmin file, which can be used to define the Jaxon DbAdmin specific env vars.

After the merge with the options in the common section, the entries in the servers options are filtered on valid values. As a consequence, only the entries for which all the required options (except port) are provided will be returned in the final list.

The default option

The default option defines a server the application will connect to when the web page is loaded or refreshed.

The access option

The access option is an object that contains multiple options to define to which databases and to which part of the application the user will have access.

The access option can be defined at top level, in this case it applies to all the database servers, or it can be defined in a specific server options, to be applied only to that server.

In the access object, the system option defines if the user has access to system databases and schemas. If set to false, which is the default, the system databases will not be listed in the user account.

The server option defines if the user has access to server specific pages. If set to false, which is the default, the user will not have access to the Databases, Process list and Variables pages, as well as the server-related Query, Import and Export pages. The corresponding menu entries will not be displayed in the sidebar menu.

The databases and schemas options restrict the user access to the listed databases and schemas.

The query logs

All the queries executed by the users can be saved in a database and viewed in a dedicated page.

Creating the query logs database

SQL scripts are provided in the https://github.com/lagdo/jaxon-dbadmin/tree/main/migrations repo to create the query logs database on PostgreSQL, MySQL (or MariaDB), or SQLite. For each DBMS, the script is in the 01-create-command-tables.up.sql file in the corresponding subdir.

Writing in the query logs

The query logs writer options are located in the logging section in the config/dbadmin.php config file.

    'logging' => [
        'options' => [
            'enduser' => [
                'enabled' => true,
            ],
            'history' => [
                'enabled' => true,
                'distinct' => true,
                'limit' => 10,
            ],
        ],
        'database' => [
            // Same as the "servers" items, but "name" is the database name.
            'driver' => 'pgsql',
            'host' => "env(LOGGING_DB_HOST)",
            'port' => "env(LOGGING_DB_PORT)",
            'username' => "env(LOGGING_DB_USERNAME)",
            'password' => "env(LOGGING_DB_PASSWORD)",
            'name' => 'logging',
        ],
    ],

The logging.database section contains the logging database connection options. The options are the same as in the above database servers options, excepted that the name option is the database name.

The logging.options.enduser.enabled option enables the logging, for queries executed in the query builder and the query editor.

The logging.options.history.enabled option enables the logging for queries executed in the editor, and the display of the query history in the query editor page. When the query history is enabled, the logging.options.history.distinct option enables the removal of duplicates in the listed queries, while the logging.options.history.limit option sets the max number of queries for pagination.

Viewing in the query logs

The /logging page in this app displays the logged queries. The form in the sidebar allows to filter the queries based on various criteria.

screenshot

The access to that page is limited to the user accounts with the email listed in the logging.allowed option in the config/dbadmin.php file.

The same database connection options as above are used.

    'logging' => [
        'database' => [
            // Same as the "servers" items, but "name" is the database name.
            'driver' => 'pgsql',
            'host' => "env(LOGGING_DB_HOST)",
            'port' => "env(LOGGING_DB_PORT)",
            'username' => "env(LOGGING_DB_USERNAME)",
            'password' => "env(LOGGING_DB_PASSWORD)",
            'name' => 'logging',
        ],
        'allowed' => [
            // The emails of users that are allowed to access the logging page.
            '[email protected]',
        ],
    ],

The query history and favorites

The queries saved in the logs from the query editor are displayed in the user query history, when the corresponding option is enabled.

Additionally, the user can also save his preferred queries in the logging database, using the Save button in the query edition page.

screenshot

Both the history and favorites queries are displayed in the query page. From those two tables, the user can copy or insert the query code in the editor.

The queries in the favorites can also be modified or deleted.

Contributing

If you're interested in helping improve this project, contributions are very welcome:

  • Bug reports: If something doesn't work as expected
  • Feature suggestions: Ideas for improvements
  • Code contributions: Help fix issues or add features
  • Documentation: Help make things clearer for others
  • Testing: Help identify problems

Feel free to open issues or pull requests. Even small improvements are appreciated.

Technical Details

  • Backend: Laravel (PHP), Jaxon
  • Frontend: Bootstrap, Blade, UI Builder
  • Containerization: Docker support included

The Jaxon DbAdmin application is actually the integration of the Jaxon DbAdmin package, which is an extension of the Jaxon library, with the Laravel framework, using the Laravel integration extension.

The UI is built with the HTML UI Builder package, and generated with the Bootstrap 5 HTML UI Builder adapter package.

The database access code (and thus the provided features) originates from Adminer. The original code was separated into multiple Composer packages, and refactored to take advantage of advanced PHP features: namespaces, interfaces, dependency injection, and so on.

License

BSD 3-Clause License - feel free to use, modify, and distribute.


Screenshots (2)  
  • screenshots/jaxon-dbadmin-logging.png
  • screenshots/jaxon-dbadmin-sqlite-chinook.png
  Files folder image Files (82)  
File Role Description
Files folder imageapp (5 directories)
Files folder imagebootstrap (2 files)
Files folder imageconfig (13 files)
Files folder imagedatabase (3 directories)
Files folder imagedocker (1 file, 1 directory)
Files folder imagepublic (3 files, 2 directories)
Files folder imageresources (3 directories)
Files folder imageroutes (2 files)
Files folder imagescreenshots (1 file)
Files folder imagetests (1 file, 2 directories)
Accessible without login Plain text file .dockerignore Data Auxiliary data
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .env.dbadmin Data Auxiliary data
Accessible without login Plain text file .env.docker Data Auxiliary data
Accessible without login Plain text file .env.example Data Auxiliary data
Accessible without login Plain text file artisan Example Example script
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file package.json Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file vite.config.js Data Auxiliary data

  Files folder image Files (82)  /  app  
File Role Description
Files folder imageActions (1 directory)
Files folder imageConsole (1 directory)
Files folder imageHttp (2 directories)
Files folder imageModels (1 file)
Files folder imageProviders (3 files)

  Files folder image Files (82)  /  app  /  Actions  
File Role Description
Files folder imageFortify (5 files)

  Files folder image Files (82)  /  app  /  Actions  /  Fortify  
File Role Description
  Accessible without login Plain text file CreateNewUser.php Class Class source
  Accessible without login Plain text file PasswordValidationRules.php Class Class source
  Accessible without login Plain text file ResetUserPassword.php Class Class source
  Accessible without login Plain text file UpdateUserPassword.php Class Class source
  Accessible without login Plain text file UpdateUserProfileInformation.php Class Class source

  Files folder image Files (82)  /  app  /  Console  
File Role Description
Files folder imageCommands (1 file)

  Files folder image Files (82)  /  app  /  Console  /  Commands  
File Role Description
  Accessible without login Plain text file CreateUser.php Class Class source

  Files folder image Files (82)  /  app  /  Http  
File Role Description
Files folder imageControllers (1 file)
Files folder imageMiddleware (2 files)

  Files folder image Files (82)  /  app  /  Http  /  Controllers  
File Role Description
  Accessible without login Plain text file Controller.php Class Class source

  Files folder image Files (82)  /  app  /  Http  /  Middleware  
File Role Description
  Accessible without login Plain text file DbAdminPackageConfig.php Class Class source
  Accessible without login Plain text file LoggingPackageConfig.php Class Class source

  Files folder image Files (82)  /  app  /  Models  
File Role Description
  Accessible without login Plain text file User.php Class Class source

  Files folder image Files (82)  /  app  /  Providers  
File Role Description
  Accessible without login Plain text file AppServiceProvider.php Class Class source
  Accessible without login Plain text file DbAdminServiceProvider.php Class Class source
  Accessible without login Plain text file FortifyServiceProvider.php Class Class source

  Files folder image Files (82)  /  bootstrap  
File Role Description
  Accessible without login Plain text file app.php Class Class source
  Accessible without login Plain text file providers.php Class Class source

  Files folder image Files (82)  /  config  
File Role Description
  Accessible without login Plain text file app.php Aux. Configuration script
  Accessible without login Plain text file auth.php Class Class source
  Accessible without login Plain text file cache.php Aux. Configuration script
  Accessible without login Plain text file database.php Aux. Configuration script
  Accessible without login Plain text file dbadmin.php Aux. Configuration script
  Accessible without login Plain text file filesystems.php Aux. Configuration script
  Accessible without login Plain text file fortify.php Aux. Configuration script
  Accessible without login Plain text file jaxon.php Class Class source
  Accessible without login Plain text file logging.php Class Class source
  Accessible without login Plain text file mail.php Aux. Configuration script
  Accessible without login Plain text file queue.php Aux. Configuration script
  Accessible without login Plain text file services.php Aux. Configuration script
  Accessible without login Plain text file session.php Aux. Configuration script

  Files folder image Files (82)  /  database  
File Role Description
Files folder imagefactories (1 file)
Files folder imagemigrations (4 files)
Files folder imageseeders (1 file)

  Files folder image Files (82)  /  database  /  factories  
File Role Description
  Accessible without login Plain text file UserFactory.php Class Class source

  Files folder image Files (82)  /  database  /  migrations  
File Role Description
  Accessible without login Plain text file 0001_01_01_000000_create_users_table.php Class Class source
  Accessible without login Plain text file 0001_01_01_000001_create_cache_table.php Class Class source
  Accessible without login Plain text file 0001_01_01_000002_create_jobs_table.php Class Class source
  Accessible without login Plain text file 2025_08_18_200152_..._to_users_table.php Class Class source

  Files folder image Files (82)  /  database  /  seeders  
File Role Description
  Accessible without login Plain text file DatabaseSeeder.php Class Class source

  Files folder image Files (82)  /  docker  
File Role Description
Files folder imageconfig (1 file)
  Accessible without login Plain text file Dockerfile Data Auxiliary data

  Files folder image Files (82)  /  docker  /  config  
File Role Description
  Accessible without login Plain text file unit.json Data Auxiliary data

  Files folder image Files (82)  /  public  
File Role Description
Files folder imageassets (2 directories)
Files folder imagejaxon (4 files)
  Accessible without login Plain text file .htaccess Data Auxiliary data
  Accessible without login Plain text file index.php Appl. Application script
  Accessible without login Plain text file robots.txt Doc. Documentation

  Files folder image Files (82)  /  public  /  assets  
File Role Description
Files folder imagecss (2 files)
Files folder imagejs (1 file)

  Files folder image Files (82)  /  public  /  assets  /  css  
File Role Description
  Accessible without login Plain text file dbadmin.css Data Auxiliary data
  Accessible without login Plain text file styles.css Data Auxiliary data

  Files folder image Files (82)  /  public  /  assets  /  js  
File Role Description
  Accessible without login Plain text file scripts.js Data Auxiliary data

  Files folder image Files (82)  /  public  /  jaxon  
File Role Description
  Accessible without login Plain text file app-0.2.3.js Data Auxiliary data
  Accessible without login Plain text file app-0.2.3.min.js Data Auxiliary data
  Accessible without login Plain text file log-1.0.2.js Data Auxiliary data
  Accessible without login Plain text file log-1.0.2.min.js Data Auxiliary data

  Files folder image Files (82)  /  resources  
File Role Description
Files folder imagecss (1 file)
Files folder imagejs (2 files)
Files folder imageviews (3 files, 3 directories)

  Files folder image Files (82)  /  resources  /  css  
File Role Description
  Accessible without login Plain text file app.css Data Auxiliary data

  Files folder image Files (82)  /  resources  /  js  
File Role Description
  Accessible without login Plain text file app.js Data Auxiliary data
  Accessible without login Plain text file bootstrap.js Data Auxiliary data

  Files folder image Files (82)  /  resources  /  views  
File Role Description
Files folder imageauth (2 files, 1 directory)
Files folder imagehtml (2 files)
Files folder imagepage (3 files)
  Accessible without login Plain text file dbadmin.blade.php Aux. Configuration script
  Accessible without login Plain text file layout.blade.php Aux. Configuration script
  Accessible without login Plain text file logging.blade.php Aux. Configuration script

  Files folder image Files (82)  /  resources  /  views  /  auth  
File Role Description
Files folder imagehtml (2 files)
  Accessible without login Plain text file layout.blade.php Aux. Configuration script
  Accessible without login Plain text file login.blade.php Aux. Configuration script

  Files folder image Files (82)  /  resources  /  views  /  auth  /  html  
File Role Description
  Accessible without login Plain text file footer.blade.php Aux. Configuration script
  Accessible without login Plain text file header.blade.php Aux. Configuration script

  Files folder image Files (82)  /  resources  /  views  /  html  
File Role Description
  Accessible without login Plain text file footer.blade.php Aux. Configuration script
  Accessible without login Plain text file header.blade.php Aux. Configuration script

  Files folder image Files (82)  /  resources  /  views  /  page  
File Role Description
  Accessible without login Plain text file footer.blade.php Aux. Configuration script
  Accessible without login Plain text file header.blade.php Aux. Configuration script
  Accessible without login Plain text file user.blade.php Aux. Configuration script

  Files folder image Files (82)  /  routes  
File Role Description
  Accessible without login Plain text file console.php Appl. Application script
  Accessible without login Plain text file web.php Appl. Application script

  Files folder image Files (82)  /  screenshots  
File Role Description
  Accessible without login Image file jaxon-dbadmin-favorites-history.png Icon Icon image

  Files folder image Files (82)  /  tests  
File Role Description
Files folder imageFeature (1 file)
Files folder imageUnit (1 file)
  Accessible without login Plain text file TestCase.php Class Class source

  Files folder image Files (82)  /  tests  /  Feature  
File Role Description
  Accessible without login Plain text file ExampleTest.php Class Class source

  Files folder image Files (82)  /  tests  /  Unit  
File Role Description
  Accessible without login Plain text file ExampleTest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads  
 100%
Total:0
This week:0