eduardlleshi/prequel

清晰简洁的数据库管理。

v1.22.3 2020-01-22 08:35 UTC

This package is not auto-updated.

Last update: 2024-09-22 07:08:42 UTC


README

Prequel

Packagist Version Join our Discord Follow Protoqol on Twitter

开发暂时搁置

TL;DR?在这里测试 Prequel!

Prequel究竟是什么?

Prequel旨在成为Laravel的数据库管理工具,以替代phpMyAdmin、Sequel Pro或MySQL Workbench等独立的数据库工具。凭借其(希望)清晰简洁的用户界面,Prequel将成为一个现代轻量级的数据库浏览器/工具,为未来的网络做好准备。Prequel的设计有意基于Laravel Telescope,因为(网络)开发者今天已经足够学习并掌握,让我们互相帮助,确保不会在庞大的知识堆中添加任何几乎无用的东西。

Prequel Screenshot

清晰简洁的数据库管理

安装

按照以下说明进行安装。
$ composer require protoqol/prequel  
$ php artisan prequel:install
安装和发布完成后,在浏览器中导航到/prequel以查看Prequel的实际效果!

更新

composer require protoqol/prequel:v1.2

当使用Prequel 1.2及更高版本时,您可以尝试使用自动更新器!

否则,您可以使用以下指定的命令进行更新。
$ php artisan prequel:update

问题、错误和功能请求可以通过此处报告!

配置

您可能已经注意到,在发布配置文件时,在config/prequel.php下出现了一个配置文件。该配置文件看起来像这样。

请注意,您可以在.env文件中定义PREQUEL_ENABLED

<?php
    
    [
        
        /*
        |--------------------------------------------------------------------------
        | Prequel Master Switch : boolean
        |--------------------------------------------------------------------------
        |
        | Manually disable/enable Prequel, if in production Prequel will always be
        | disabled. Reason being that nobody should ever be able to directly look
        | inside your database besides you or your dev team (obviously).
        |
        */
        
        'enabled' => env('PREQUEL_ENABLED', true),
        
        
        /*
        |--------------------------------------------------------------------------
        | Prequel Locale : string
        |--------------------------------------------------------------------------
        |
        | Choose what language Prequel should display in.
        |
        */
        
        'locale' => env('APP_LOCALE', 'en'),
        
        
        /*
        |--------------------------------------------------------------------------
        | Prequel Path
        |--------------------------------------------------------------------------
        |
        | The path where Prequel will be residing. Note that this does not affect
        | Prequel API routes.
        |
        */
        
        'path' => 'prequel',
        
        
        /*
        |--------------------------------------------------------------------------
        | Laravel asset generation suffix and namespace definition
        |--------------------------------------------------------------------------
        |
        | Here you can define your preferred asset suffixes and directory/namespaces.
        | Separate with a double backwards slash to define namespace and directory
        | location. Everything after the last '\\' will be treated as a suffix.
        | Note that the backslash needs to be escaped with an extra backslash
        |
        | For example
        |
        |  Configuration
        |     'suffixes' => [
        |           'model'  => 'Models\\Model',
        |           'seeder' => 'MyMadeUpSeederSuffix'
        |       ]
        |
        |  When generating for `users` table
        |     (directory) app/models/UserModel.php
        |     (qualified class) App\Models\UserModel
        |     (directory) database/seeds/UserMyMadeUpSeederSuffix.php
        |
        */
        
        'suffixes' => [
            'model'      => 'Models\\',
            'seeder'     => 'Seeder',
            'factory'    => 'Factory',
            'controller' => 'Controller',
            'resource'   => 'Resource',
        ],
        
        
        /*
        |--------------------------------------------------------------------------
        | Prequel Database Configuration : array
        |--------------------------------------------------------------------------
        |
        | This enables you to fully configure your database connection for Prequel.
        |
        */
        
        'database' => [
            'connection' => env('DB_CONNECTION', 'mysql'),
            'host'       => env('DB_HOST', '127.0.0.1'),
            'port'       => env('DB_PORT', '3306'),
            'database'   => env('DB_DATABASE', 'homestead'),
            'username'   => env('DB_USERNAME', 'homestead'),
            'password'   => env('DB_PASSWORD', 'secret'),
        ],
        
        
        /*
        |--------------------------------------------------------------------------
        | Prequel ignored databases and tables : array
        |--------------------------------------------------------------------------
        | Databases and tables that will be ignored during database discovery.
        |
        | Using 'mysql' => ['foo']  ignores only the mysql.foo table.
        | Using 'mysql' => ['*'] ignores the entire mysql database.
        |
        */
        
        'ignored' => [
            // 'information_schema'  => ['*'],
            // 'sys'                 => ['*'],
            // 'performance_schema'  => ['*'],
            // 'mysql'               => ['*'],
            '#mysql50#lost+found' => ['*'],
        ],
        
        
        /*
        |--------------------------------------------------------------------------
        | Prequel pagination per page : integer
        |--------------------------------------------------------------------------
        |
        | When Prequel retrieves paginated information, this is the number of
        | records that will be in each page.
        |
        */
        
        'pagination' => 100,
        
        
        /*
        |--------------------------------------------------------------------------
        | Prequel middleware : array
        |--------------------------------------------------------------------------
        |
        | Define custom middleware for Prequel to use.
        |
        | Ex. 'web', Protoqol\Prequel\Http\Middleware\Authorised::class
        |
        */
        
        'middleware' => [
            Protoqol\Prequel\Http\Middleware\Authorised::class,
        ],
    ];

Prequel Screenshot

清晰简洁的数据库管理

贡献

查看贡献了解如何为Prequel做出贡献!

贡献者

许可

Prequel采用MIT许可。有关更多信息,请参阅许可文件