Prequel for Laravel. Clear and concise database management.

Overview

Prequel

Packagist Version Join our Discord Follow Protoqol on Twitter

TL;DR? Test Prequel here!

What is Prequel exactly?

Prequel is meant to be a database management tool for Laravel to replace the need for separate standalone database tools like phpMyAdmin, Sequel Pro or MySQL Workbench. With its (hopefully) clear and concise UI, Prequel is to be a modern and lightweight database browser/tool ready for the web of the future. Prequel's design is purposefully based on that of Laravel Telescope because (web-)developers today have enough to learn and master already, so let's help eachother out and make sure to not add anything virtually useless to that huge pile of knowledge.

Prequel Screenshot

Clear and concise database management

Installation

To install follow the instructions below.
$ composer require protoqol/prequel
$ php artisan prequel:install
When installation and publishing is done navigate to /prequel in your browser to see Prequel in action!

Updating

composer require protoqol/prequel:v1.2

When using Prequel 1.2 and up you can try and use the auto updater!

And else to update you can use the command specified below.
$ php artisan prequel:update

Issues, bugs and feature requests can be reported here!

Configuration

You might have noticed that, while publishing a config file appeared under config/prequel.php. That configuration file looks something like this.

Note that you can define PREQUEL_ENABLED in your .env file.

<?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

Clear and concise database management

Contributing

See Contributing to see how you can contribute to Prequel!

Contributors

License

Prequel is licensed under the MIT License. Please see License File for more information.

Comments
  • [Feature] Beta dark theme

    [Feature] Beta dark theme

    PR Naming convention

    [FEATURE/FIX/REFACTOR/README] Your PR title

    Issue or feature explanation

    A short explanation as to why this is needed, or, would be a great addition to Prequel! Or a reference to an open issue. this is a theme switcher, to switch between the default light theme and a dark theme

    Proposed solution/change

    Short explanation how this was done. This was done by creating root css variables and dark theme css variables paired with custom tailwind classes. Calling this beta because certain things definitely need more work but I feel like its at a good place right now to let people start using it. but could use a designers take on it.

    opened by James-N-M 14
  • [BUG] Can't make it work with Homestead

    [BUG] Can't make it work with Homestead

    So I wanted to try this package, I installed on my project but I have this error message when I want go to /prequel

    prequel1

    This is the database connection on my .env file

    DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=33060 DB_DATABASE=prequel DB_USERNAME=homestead DB_PASSWORD=secret

    opened by godhandkiller 12
  • [FEATURE] List of DBs that will be ignored by default added.

    [FEATURE] List of DBs that will be ignored by default added.

    Prevent to load specific DBs.

    Practical use

    • DB #mysql#lost+found is related with a bug in MySql. Is an invalid DB that will crash Prequel if it's present. I got this problem in laravel/homestead 8.5.
    • Remove from the listing specific DBs. Good to have if you want to limit the scope of discovery of Prequel.

    Love the project, thanks for do this

    opened by mchlbatista 10
  • [BUG] Custom middleware not working

    [BUG] Custom middleware not working

    Describe the bug When adding a custom middleware the page will always return to the home page as if the middleware is returning false.

    To Reproduce Steps to reproduce the behavior:

    1. Create a gate to check if the user has role 'Admin'
    2. Create middleware using the gate
    3. Open url
    4. See the bug

    Expected behavior When logged in as an admin user should see the Prequel page.

    Actual Behavior Returns to the main page as if the user does not have the admin role.

    PHP Version

    • Version [7.1]

    Database type

    • Type [mysql]
    • Version [v5.7]

    Desktop (please complete the following information):

    • Browser [chrome]
    • Version [90.0.4430.85]
    opened by NeonOdyssey 8
  • [FEATURE REQUEST] Tests for source code

    [FEATURE REQUEST] Tests for source code

    Is your feature request related to a problem? Please describe. It is best practice to include some sort of unit, integration or feature type tests with your libraries. I tend not to use an open source product / library if they don't have adequate tests. Not only does it help with code quality and reducing bugs, it gives the reader an idea of how the product functions without having to do a deep-dive into the code.

    Describe the solution you'd like I'd like to see some unit tests for both front and back-end code. I'm not proposing anything insane like even 80% code, but some framework to get contributors started.

    Additional context It'd be nice to know if this is something that the author doesn't think is important, thinks they didn't have time to do, thinks isn't important, or doesn't know how to implement effectively. Sharing this sentiment can help contributors understand how to best proceed and help the project.

    opened by aaronsaray 8
  • [BUG] Table 'users'

    [BUG] Table 'users'

    Describe the bug If selected any project database table it loads correct data but if select Users table it loads in any table the data of the current database project.

    To Reproduce Steps to reproduce the behavior:

    1. Go to current project users table
    2. Click on other project database users table
    3. See error

    Expected behavior Show data of selected database table, not the project installed prequel users table data.

    Screenshots

    alt text

    Desktop (please complete the following information):

    • Chrome
    • Version 75
    BUG 
    opened by ArielMejiaDev 8
  • [FIX] fixed error in DatabaseController

    [FIX] fixed error in DatabaseController

    PR Naming convention

    [FIX] fixed error in DatabaseController

    Issue or feature explanation

    After the recent update, Prequel started showing errors when trying to access to the tables in any database.

    Proposed solution/change

    There was a chunk of code in the DatabaseController which seems to have been pasted by mistake. Removing the code allows Prequel to work again.

    opened by lukadriel7 7
  • [BUG] Can not install on laravel 6

    [BUG] Can not install on laravel 6

    Problem 1 - Installation request for composer/composer (locked at 1.9.0) -> satisfiable by composer/composer[1.9.0]. - protoqol/prequel v1.22 requires composer/composer dev-master -> satisfiable by composer/composer[dev-master]. - protoqol/prequel v1.22.1 requires composer/composer dev-master -> satisfiable by composer/composer[dev-master]. - Conclusion: don't install composer/composer dev-master - Installation request for protoqol/prequel ^1.22 -> satisfiable by protoqol/prequel[v1.22, v1.22.1].

    opened by sctouch 7
  • [RFC] Adding i18n

    [RFC] Adding i18n

    Request For Comments: Internalization - i18n

    I was thinking about all the features that Prequel is still missing and i18n came across my mind, but I'm not really sure if this is worth looking into. That's why I opened this RFC.

    See points below for my thoughts about this.

    • Would this be helpful to people?
    • Is this worth investing time into?
    • Front-end or back-end implementation?
    • Are there people willing to translate this?

    What do you think?

    For those unaware of what i18n is, it's basically translating Prequel to other languages.
    help wanted RFC 
    opened by QuintenJustus 7
  • [BUG] Prequel not loading

    [BUG] Prequel not loading

    Describe the bug Installed on Laravel 5.7.28 followed the instructions and got an error in the console. See the screenshot. As examined main.blade <script> // Pass initial data to JavaScript window.Prequel = {}; window.Prequel.env = @json($env); window.Prequel.error = { error : false, detailed: '', code : '', }; window.Prequel.data = @json($data['collection']); window.Prequel.flat = @json($data['flatTableCollection']); </script> problem occurs here: window.Prequel.data = @ json($data['collection']); (I've specially pressed space at json because github was mentioning related user)

    Screenshots prequel error

    BUG 
    opened by dima2306 6
  • [BUG] Malformed UTF-8 characters

    [BUG] Malformed UTF-8 characters

    There was an error while loading this table. See the following: Malformed UTF-8 characters, possibly incorrectly encoded

    How to fix to read my tables with this encode?

    opened by msbtec 5
  • [BUG] Custom Database Connection Name

    [BUG] Custom Database Connection Name

    Describe the bug Not support with custom connection name that difference from driver name. e.g: in config database.php i am using connections with name defaultdb and driver using mysql

    To Reproduce Assume you are using mysql database. Steps to reproduce the behavior:

    1. Edit 'config/database.php' edit in connection array key with driver mysql to other than mysql. eg:
        'connections' => [
            'mydb' => [
                  'driver' => 'mysql'
                  .....
    
    1. Leave the config/prequel.php as is
    2. Open prequel on browser
    3. Error with Exception Selected invalid or unsupported database driver

    Next try i change my config path prequel.database.connection to mydb, same like on database config Open prequel on browser, and is still error with message:

    Your database connection might not be supported yet, currently supported: 'mysql', 'pgsql'. (Yours is: 'mydb').
    

    Expected behavior Prequel database config must follow the configuration from the database config, and make the connection details such as host, port, database, username, password is optional in the prequel config, just store the connection name on prequel config, and follow the rest from database config.

    Screenshots https://ibb.co/9WMmwfz https://ibb.co/8M02W7d

    PHP Version

    • Version : 8.0.8

    Database type

    • Type : mysql
    • Version : 10.5.11-MariaDB

    Desktop (please complete the following information):

    • Browser : Chrome
    • Version : 92.0.4515.107
    opened by fauzie 1
  • [i18n] Help translate Prequel!

    [i18n] Help translate Prequel!

    Internationalization

    It has been decided that i18n for Prequel is definitely something people are looking for, see #33. That's why I need you guys to help translate! I am unfortunately not a polyglot 😅

    Translators

    • Brazilian Portuguese by @HDVinnie & @oojunior
    • Hungarian by @M4ST3RX
    • Dutch by @QuintenJustus
    • Finnish by @HDVinnie & @PVRCK
    • Spanish by @chuckrincon

    How can I help translate?

    • Clone the Prequel repo and pull in the Dev branch
    • Create a new branch with the following naming convention: feature-lang-{your language here}.
    • Go into resources/lang/
    • Copy the en directory and rename it to the language you're translating to, e.g. fr for French.
    • Open the lang file inside the newly created directory and you're all set to start translation!
    • When you're done you can create a pull request!
    help wanted 
    opened by QuintenJustus 3
  • Additional database type support

    Additional database type support

    Why I need your help

    Currently I'm working on a lot of features, which included adding support for different database types namely postgresql but that takes a lot of time and keeps me from adding the other features. So because of the time it takes I'm inclined to push back db support to the release after the upcoming one. But then still, it takes a lot of time.

    My request

    Is anyone willing to help me out with adding support for sqlite and sqlserver?

    Support so far

    • mysql by @QuintenJustus
    • pgsql by @M4ST3RX
    FEATURE help wanted good first issue 
    opened by QuintenJustus 5
Releases(v1.23.0)
Owner
Protoqol
Protoqol Software Development - founded by @QuintenJustus
Protoqol
⛔️ Laravel Tinx is archived and no longer maintained.

⛔️ Laravel Tinx (Deprecated) Laravel Tinx was archived on 12th December 2019 and is no longer maintained. Looking for a reloadable version of Laravel

James Furey 440 Dec 27, 2022
InfyOm Laravel Generator - API, Scaffold, Tests, CRUD Laravel Generator

InfyOm Laravel Generator Generate Admin Panels CRUDs and APIs in Minutes with tons of other features and customizations with 3 different themes. Read

InfyOmLabs (InfyOm Technologies) 3.5k Jan 1, 2023
A PHP-based sandboxing library with a full suite of configuration and validation options.

A full-scale PHP 5.4+ sandbox class that utilizes PHP-Parser to prevent sandboxed code from running unsafe code. It also utilizes FunctionParser to di

Corveda 192 Dec 10, 2022
:rocket: A Smart CRUD Generator For Laravel

Features Generate your models, views, controllers, routes and migrations just in a few clicks. Models visualization through a graph presentation (New

Houssain Amrani 891 Dec 23, 2022
Laravel IDE Helper

Laravel IDE Helper Generator Complete PHPDocs, directly from the source This package generates helper files that enable your IDE to provide accurate a

Barry vd. Heuvel 12.8k Dec 29, 2022
This package extends the core file generators that are included with Laravel 5

Extended Migration Generators for Laravel 6, 7 and 8 Easily define the migration schema right in your make:migration command. The new commands this pa

Laracasts 2.4k Dec 29, 2022
Laravel API Documentation Generator

Laravel API Documentation Generator Automatically generate your API documentation from your existing Laravel/Lumen/Dingo routes. php artisan apidoc:ge

Marcel Pociot 3.3k Dec 21, 2022
A cli tool for creating Laravel packages

Laravel Packager This package provides you with a simple tool to set up a new package and it will let you focus on the development of the package inst

JeroenG 1.3k Dec 22, 2022
A MySQL Workbench plugin which exports a Model to Laravel 5 Migrations

MySQL Workbench Export Laravel 5 Migrations Plugin A MySQL Workbench plugin that allows for exporting a model to Laravel 5 migrations that follow PSR-

Brandon Eckenrode 902 Jan 2, 2023
⚙️ A Laravel package to decompose your installed packages, their dependencies, your app & server environment

Introduction Laravel Decomposer decomposes and lists all the installed packages and their dependencies along with the Laravel & the Server environment

LUBUS 513 Dec 30, 2022
🍪 Write gorgeous documentation for your products using Markdown inside your Laravel app.

LaRecipe Write gorgeous documentations for your products using Markdown inside your Laravel app. LaRecipe ?? LaRecipe is simply a code-driven package

Saleem Hadad 2.1k Dec 29, 2022
Module Generator Composer Package For Laravel

Module Generator Installation You can install the package via composer: composer require teacoders/module-generator Run the command below to publish t

Tea Coders 21 Jan 8, 2022
Creates an 'artisan workflow:make' command to scaffold out a number of useful GitHub actions workflows for Laravel

Laravel workflow generator This creates a make:workflow artisan command to scaffold out a number of useful GitHub actions workflows for Laravel. Insta

Len Woodward 9 Jul 18, 2021
A foundation for WordPress Plugin Development that aims to provide a clear and consistent guide for building your plugins.

WordPress Plugin Boilerplate A standardized, organized, object-oriented foundation for building high-quality WordPress Plugins. Contents The WordPress

Devin 7.2k Jan 4, 2023
Reference for writing clear PHP code

clearPHP Reference for writing clear PHP code It is difficult to know when one's code is well written. There are recommendations for writing PHP code

Seguy Damien 947 Dec 22, 2022
1000+ micro code pieces with clear explanation @ onelinerhub.com

Onelinerhub Lib of micro code pieces, well explained and mostly single-line solutions @ onelinerhub.com. Why we do it and where we go We're building n

Onelinerhub.com - micro code solutions 681 Jan 4, 2023
Clear all your logs in [linux/windows] servers 🛡️

Log-killer Log Killer is tool for [Linux/Windows] Servers This tool will delete all your logs just download the tool and run it on the server if your

Rizer 281 Nov 24, 2022
DooTask is a lightweight open source online project task management tool that provides various document collaboration tools, online mind mapping, online flowcharting, project management, task distribution, instant IM, file management and other tools.

DooTask is a lightweight open source online project task management tool that provides various document collaboration tools, online mind mapping, online flowcharting, project management, task distribution, instant IM, file management and other tools.

kuaifan 3k Jan 5, 2023
mini Project in Laravel and vue js. Real World Laravel 8x + vue js Dashboard.Task management and project management system

mini Project in Laravel and vue js. Real World Laravel 8x + vue js Dashboard.Task management and project management system. Dashboard features such as: Complete Dashboard, Custom Authentication, Email Verification, custom-login-register-forgot password (without jetstream).

Hasmukh Dharajiya 2 Sep 20, 2022