Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Commit

Permalink
✨ [FEATURE] You can now write your queries inside a Monaco Editor!
Browse files Browse the repository at this point in the history
  • Loading branch information
Quinten Justus committed Sep 8, 2019
1 parent 1165315 commit 4973303
Show file tree
Hide file tree
Showing 28 changed files with 691 additions and 409 deletions.
235 changes: 150 additions & 85 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ $ php artisan prequel:install
###### When installation and publishing is done navigate to `/prequel` in your browser to see Prequel in action!

## Updating
###### To update you can use the command specified below.
```bash
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.
```bash
$ php artisan prequel:update
```
Expand All @@ -56,91 +61,151 @@ You might have noticed that, while publishing a config file appeared under `conf
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 Path : string
|--------------------------------------------------------------------------
|
| The path where Prequel will be residing. Note that this does not affect
| Prequel API routes.
|
*/
'path' => 'prequel',
<?php

/*
|--------------------------------------------------------------------------
| 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' => ['*'] ignores the entire mysql database.
| Using 'mysql' => ['foo'] ignores only the mysql.foo table.
*/
'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. 'apiNamedMiddleware' or Protoqol\Prequel\Http\Middleware\Authorised::class
|
*/

'middleware' => [
Protoqol\Prequel\Http\Middleware\Authorised::class,
],
];
[

/*
|--------------------------------------------------------------------------
| 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](./assets/prequel_screenshot.png)
Expand Down
49 changes: 48 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,47 @@
## Prequel 1.11.11-beta
## Latest stable version: Prequel v1.22

### Prequel v1.22

##### Definitive for next release
- Import
- Export
- Log
- Settings
- Maintenance

### Refactored
- [REFACTOR] Code structure is now better organised

### Functionality
- [FEATURE] PostgresSQL support
- [FEATURE] i18n, Prequel is now multilingual!
- [FEATURE] Management-mode (5)
- Insert row
- Laravel specific actions (generating assets)
- View structure
- Write and run raw SQL within the Monaco Editor (same as the vscode editor)
- Monaco editor for writing queries
- [FEATURE] Define your own suffix and namespace/directory when generating assets with the Laravel actions in config
- [FEATURE] Auto updater for Prequel

### Fixed
- [FIX] Assets
- [FIX] Custom path not working when multiple were selected
- [FIX] $visible model properties were not returning
- [FIX] Style fixes

___

### Prequel v1.13 - Out of beta

### Functionality
- [FEATURE] Defining your own middleware for Prequel in config
- [FEATURE] Partial PGSQL Support

###### Fixes and refactors were omitted
___

### Prequel v1.11.11-beta

##### Definitive for next release
- Add support for postgres.
Expand Down Expand Up @@ -36,3 +79,7 @@

### Readme
- [README] Added config docs to readme, fixing issue #28.

___

Start of changelog
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
"email": "quinten@protoqol.xyz"
}
],
"minimum-stability": "beta",
"minimum-stability": "stable",
"require": {
"php": "^7.1",
"composer/composer": "dev-master",
"laravel/framework": "^5.6",
"phpmyadmin/sql-parser": "^5.0",
"ext-pdo": "*",
"ext-curl": "*",
"ext-json": "*"
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@
"@fortawesome/free-solid-svg-icons": "^5.8.2",
"@fortawesome/vue-fontawesome": "^0.1.6",
"axios-request-handler": "^1.0.4",
"highlight.js": "^9.15.8",
"monaco-editor-webpack-plugin": "^1.7.0",
"sweetalert2": "^8.15.0",
"vue-monaco": "^1.1.0",
"vuejs-paginate": "^2.1.0"
}
}
2 changes: 1 addition & 1 deletion public/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/app.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion resources/assets/js/bootstrap/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ window.Swal = require('sweetalert2')
require('./sweetalertMixins')
require('./axios')
require('./fontAwesome')
require('./highlight')
require('./functions')
27 changes: 0 additions & 27 deletions resources/assets/js/bootstrap/highlight.js

This file was deleted.

Loading

0 comments on commit 4973303

Please sign in to comment.