-
-
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/resources/assets/js/components/MainContent/ManageDatabase/Migrations.vue b/resources/assets/js/components/MainContent/ManageDatabase/Migrations.vue
index 7d33e3a..de64024 100755
--- a/resources/assets/js/components/MainContent/ManageDatabase/Migrations.vue
+++ b/resources/assets/js/components/MainContent/ManageDatabase/Migrations.vue
@@ -45,10 +45,8 @@
},
resetMigrations: function() {
- api.get('reset/migrations').then(res => {
- if (res) {
- window.location.reload();
- }
+ api.get('reset/migrations').finally(() => {
+ window.location.reload();
});
},
},
@@ -57,6 +55,7 @@
diff --git a/resources/assets/js/components/MainContent/Table/Table.vue b/resources/assets/js/components/MainContent/Table/Table.vue
index c378d82..3f1a758 100755
--- a/resources/assets/js/components/MainContent/Table/Table.vue
+++ b/resources/assets/js/components/MainContent/Table/Table.vue
@@ -179,6 +179,7 @@
.table-wrapper {
table {
+ @apply mb-6;
@apply w-full;
@apply rounded;
@apply bg-gray-200;
diff --git a/src/Classes/App/AppStatus.php b/src/Classes/App/AppStatus.php
index 45db388..ea2ee3f 100755
--- a/src/Classes/App/AppStatus.php
+++ b/src/Classes/App/AppStatus.php
@@ -6,12 +6,12 @@
use FilesystemIterator;
use Illuminate\Database\Console\Migrations\MigrateCommand;
use Illuminate\Database\Migrations\Migration;
+use PDO;
use Protoqol\Prequel\Classes\Database\DatabaseConnector;
use Protoqol\Prequel\Classes\Database\DatabaseTraverser;
/**
* Class AppStatus
- *
* @package Protoqol\Prequel\Classes\App
*/
class AppStatus
@@ -19,14 +19,12 @@ class AppStatus
/**
* Holds Prequel's database connection.
- *
* @var \Illuminate\Database\Connection
*/
private $connection;
/**
* Holds database traverser instance.
- *
* @var \Protoqol\Prequel\Classes\Database\DatabaseTraverser $traverser
*/
private $traverser;
@@ -38,35 +36,65 @@ public function __construct()
}
/**
+ * Get general status.
* @return array
*/
- public function getStatus()
+ public function getStatus(): array
{
return [
- 'migrations' => (new Migrations())->pending(),
- 'querySpeed' => $this->querySpeed(),
- 'databaseHealth' => $this->databaseHealth(),
+ 'migrations' => (new Migrations())->pending(),
+ 'serverInfo' => $this->serverInfo(),
+ 'permissions' => $this->userPermissions(),
];
}
/**
- * Get current query speed.
- *
- * @return string
+ * Get server info.
+ * @return array
*/
- private function querySpeed()
+ private function serverInfo(): array
{
- // @TODO Get from Momento::class
- return '322';
+ $serverInfo = $this->connection->getPdo()->getAttribute(PDO::ATTR_SERVER_INFO);
+ $explodedServerInfo = explode(' ', $serverInfo);
+ $serverInfoArray = [];
+
+ foreach ($explodedServerInfo as $attr) {
+ $split = explode(': ', $attr);
+ $key = strtoupper(str_replace(' ', '_', str_replace(':', '', $split[0])));
+ $serverInfoArray[$key] = $split[1];
+ }
+
+ return $serverInfoArray;
}
/**
- * Check database heatlh.
- *
- * @return string
+ * Check database permissions for current user.
+ * @return array
*/
- private function databaseHealth()
+ public function userPermissions(): array
{
- return 'OK';
+ $grants = (array)$this->connection->select('SHOW GRANTS FOR CURRENT_USER();')[0];
+ $privs = (string)array_values($grants)[0];
+ $permissions = [];
+
+ // If anyone seeing this has a better way of checking this, be my guest!
+ $permissions['SELECT'] = (bool)preg_match('(SELECT)', $privs);
+ $permissions['INSERT'] = (bool)preg_match('(INSERT)', $privs);
+ $permissions['UPDATE'] = (bool)preg_match('(UPDATE)', $privs);
+ $permissions['DELETE'] = (bool)preg_match('(DELETE)', $privs);
+ $permissions['FILE'] = (bool)preg_match('(FILE)', $privs);
+ $permissions['CREATE'] = (bool)preg_match('(CREATE)', $privs);
+ $permissions['DROP'] = (bool)preg_match('(DROP)', $privs);
+ $permissions['ALTER'] = (bool)preg_match('(ALTER)', $privs);
+ $permissions['HAS_ALL'] = true;
+
+ // Check if user has all needed permissions
+ foreach ($permissions as $key => $val) {
+ if ($val === false) {
+ $permissions['HAS_ALL'] = false;
+ }
+ }
+
+ return $permissions;
}
}
diff --git a/src/Classes/Database/DatabaseConnector.php b/src/Classes/Database/DatabaseConnector.php
index 0b36122..db97185 100755
--- a/src/Classes/Database/DatabaseConnector.php
+++ b/src/Classes/Database/DatabaseConnector.php
@@ -7,7 +7,6 @@
/**
* Class DatabaseConnector
- *
* @package Protoqol\Prequel\Classes\Database
*/
class DatabaseConnector
@@ -21,6 +20,7 @@ class DatabaseConnector
public function getConnection()
{
$this->connection = (new Connection($this->getPdo()));
+
return $this->connection;
}
@@ -44,8 +44,8 @@ private function constructDsn()
$connection = config('prequel.database.connection');
$database = config('prequel.database.database');
$host = config('prequel.database.host');
- $port = (int)config('prequel.database.port');
+ $port = config('prequel.database.port');
- return $connection.':dbname='.$database.';host='.$host.';port='.$port;
+ return $connection . ':dbname=' . $database . ';host=' . $host . ';port=' . $port;
}
}
diff --git a/src/Classes/Database/DatabaseTraverser.php b/src/Classes/Database/DatabaseTraverser.php
index e7a0427..1f48dbb 100755
--- a/src/Classes/Database/DatabaseTraverser.php
+++ b/src/Classes/Database/DatabaseTraverser.php
@@ -4,6 +4,7 @@
namespace Protoqol\Prequel\Classes\Database;
+use phpDocumentor\Reflection\Types\Mixed_;
use Protoqol\Prequel\Classes\Database\DatabaseConnector;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Arr;
@@ -12,7 +13,6 @@
/**
* Class DatabaseTraverser
- *
* @package Protoqol\Prequel\Classes\Database
*/
class DatabaseTraverser
@@ -20,21 +20,18 @@ class DatabaseTraverser
/**
* Type of database e.g. mysql, postgres, sqlite or sql server
- *
* @var string $databaseConn
*/
private $databaseConn;
/**
* Query collection based on $DB_CONN
- *
* @var \Protoqol\Prequel\Classes\Database\SequelAdapter $databaseQueries
*/
private $databaseQueries;
/**
* Holds custom database connection.
- *
* @var \Illuminate\Database\Connection $connection
*/
private $connection;
@@ -42,7 +39,7 @@ class DatabaseTraverser
/**
* DatabaseTraverser constructor.
*
- * @param string|null $databaseType
+ * @param string|null $databaseType
*/
public function __construct(?string $databaseType = null)
{
@@ -55,11 +52,10 @@ public function __construct(?string $databaseType = null)
/**
* Build array of all databases and their respective tables and
* sort alphabetically.
- *
* @return array
* @throws \Exception
*/
- public function getAll() :array
+ public function getAll(): array
{
$collection = [];
$flatTableCollection = [];
@@ -67,12 +63,8 @@ public function getAll() :array
foreach ($this->getAllDatabases() as $value) {
$databaseName = (object)$value['name'];
- if (array_key_exists(
- $databaseName->official,
- config('prequel.ignored')
- )) {
- if (config('prequel.ignored.'.$databaseName->official)[0]
- === '*') {
+ if (array_key_exists($databaseName->official, config('prequel.ignored'))) {
+ if (config('prequel.ignored.' . $databaseName->official)[0] === '*') {
continue;
}
}
@@ -83,19 +75,11 @@ public function getAll() :array
"tables" => $this->getTablesFromDB($databaseName->official),
];
- foreach (
- $collection[$databaseName->pretty]['tables'] as $key => $table
- ) {
- $tablesToIgnore = config('prequel.ignored.'
- .$databaseName->official) ?? [];
- if (!array_search(
- $table['name']['official'],
- $tablesToIgnore
- )) {
- $tableName = $databaseName->official.'.'
- .$table['name']['official'];
-
- array_push($flatTableCollection, $tableName);
+ foreach ($collection[$databaseName->pretty]['tables'] as $key => $table) {
+ $tablesToIgnore = config('prequel.ignored.' . $databaseName->official) ?? [];
+
+ if (!array_search($table['name']['official'], $tablesToIgnore)) {
+ array_push($flatTableCollection, $databaseName->official . '.' . $table['name']['official']);
} else {
unset($collection[$databaseName->pretty]['tables'][$key]);
}
@@ -113,7 +97,7 @@ public function getAll() :array
/**
* Tries to find matching model for the given table.
*
- * @param string|null $tableName
+ * @param string|null $tableName
*
* @return Model|bool
*/
@@ -124,10 +108,10 @@ public function getModel(?string $tableName)
}
$rootNamespace = app()->getNamespace();
- $modelName = Str::studly(Str::singular($tableName));
+ $modelName = Str::studly(Str::singular($tableName));
foreach (['', 'Model\\', 'Models\\'] as $subNamespace) {
- $model = $rootNamespace.$subNamespace.$modelName;
+ $model = $rootNamespace . $subNamespace . $modelName;
if (class_exists($model)) {
return new $model;
}
@@ -139,9 +123,9 @@ public function getModel(?string $tableName)
/**
* Get information about a specific column
*
- * @param string $database Database name
- * @param string $table Table name
- * @param array $column Column name
+ * @param string $database Database name
+ * @param string $table Table name
+ * @param array $column Column name
*
* @return array
*/
@@ -149,8 +133,8 @@ public function getColumnData(
string $database,
string $table,
array $column
- ) :array
- {
+ ): array {
+
$select = [
'TABLE_SCHEMA',
'TABLE_NAME',
@@ -176,31 +160,33 @@ public function getColumnData(
/**
* Get table structure
*
- * @param string $database Database name
- * @param string $table Table name
+ * @param string $database Database name
+ * @param string $table Table name
*
* @return array
*/
- public function getTableStructure(string $database, string $table) :array
+ public function getTableStructure(string $database, string $table): array
{
$columns = $this->connection->select("SHOW COLUMNS FROM `$database`.`$table`");
+
return $columns;
}
/**
* Get all tables from database
*
- * @param string $database Database name
+ * @param string $database Database name
*
* @return array
* @throws \Exception
*/
- public function getTablesFromDB(string $database) :array
+ public function getTablesFromDB(string $database): array
{
$tables = $this->connection->select($this->databaseQueries->showTablesFrom($database));
// Collect differently if postgres. @TODO.
$tmp = [];
+
if ($this->databaseConn === 'pgsql') {
for ($i = 0; $i < count($tables); $i++) {
if ($tables[$i]->schemaname === $database) {
@@ -216,26 +202,26 @@ public function getTablesFromDB(string $database) :array
/**
* Get all tables from "main" database (DB_DATABASE in .env)
- *
* @Note Unused
* @return array
* @throws \Exception
*/
- public function getAllTables() :array
+ public function getAllTables(): array
{
$tables = $this->connection->select($this->databaseQueries->showTables());
+
return $this->normalise($tables);
}
/**
* Get all databases
- *
* @return array
* @throws \Exception
*/
- public function getAllDatabases() :array
+ public function getAllDatabases(): array
{
$databases = $this->connection->select($this->databaseQueries->showDatabases());
+
return $this->normalise($databases);
}
@@ -249,11 +235,11 @@ public function getAllDatabases() :array
* 'String': Mixed (single value)
* -----------------
*
- * @param array $arr Query results
+ * @param array $arr Query results
*
* @return array
*/
- public function normalise(array $arr) :array
+ public function normalise(array $arr): array
{
$normalised = [];
@@ -278,11 +264,11 @@ public function normalise(array $arr) :array
/**
* Prettify names, meaning: remove special characters; capitalise each word.
*
- * @param string $name
+ * @param string $name
*
* @return string
*/
- public function prettifyName(string $name) :string
+ public function prettifyName(string $name): string
{
$words = preg_split('/[!@#$%^&*(),.?":{}|<>_-]/', $name);
$prettyName = '';
diff --git a/src/Http/Controllers/DatabaseController.php b/src/Http/Controllers/DatabaseController.php
index 2b26c7e..88e5f88 100755
--- a/src/Http/Controllers/DatabaseController.php
+++ b/src/Http/Controllers/DatabaseController.php
@@ -8,12 +8,12 @@
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Route;
+use Protoqol\Prequel\Classes\Database\DatabaseConnector;
use Protoqol\Prequel\Classes\Database\DatabaseTraverser;
use Protoqol\Prequel\Http\Requests\PrequelDatabaseRequest;
/**
* Class DatabaseActionController
- *
* @package Protoqol\Prequel\Http\Controllers
*/
class DatabaseController extends Controller
@@ -21,36 +21,38 @@ class DatabaseController extends Controller
/**
* Qualified table name; 'database.table'
- *
* @var string $qualifiedName
*/
- public $qualifiedName;
+ private $qualifiedName;
/**
* Table name
- *
* @var string $tableName
*/
- public $tableName;
+ private $tableName;
/**
* Database name
- *
* @var string $databaseName
*/
- public $databaseName;
+ private $databaseName;
/**
* Holds model for given table if one exists.
- *
* @var Model $model
*/
- public $model;
+ private $model;
+
+ /**
+ * Holds connection using credentials from config.
+ * @var \Illuminate\Database\Connection $connection
+ */
+ private $connection;
/**
* DatabaseActionController's constructor
*
- * @param \Illuminate\Http\Request|\Protoqol\Prequel\Http\Requests\PrequelDatabaseRequest $request
+ * @param \Illuminate\Http\Request|\Protoqol\Prequel\Http\Requests\PrequelDatabaseRequest $request
*/
public function __construct($request)
{
@@ -58,45 +60,51 @@ public function __construct($request)
$this->databaseName = $request->database;
$this->qualifiedName = $request->qualifiedName;
$this->model = $request->model;
+ $this->connection = (new DatabaseConnector())->getConnection();
}
/**
* Get table data, table structure and its qualified name
- *
* @return mixed
*/
public function getTableData()
{
- if ($this->model
- && $this->databaseName
- === config('database.connections.mysql.database')
- ) {
- $tableData = $this->model->paginate(config('prequel.pagination'));
- } else {
- $tableData = DB::table($this->qualifiedName)
- ->paginate(config('prequel.pagination'));
+ // If Model exists
+ if ($this->model && $this->databaseName === config('database.connections.mysql.database')) {
+ $hidden = $this->model->getHidden();
+ $paginated = $this->model->paginate(config('prequel.pagination'));
+ $paginated->setCollection($paginated->getCollection()->makeVisible($hidden));
+
+ return [
+ "table" => $this->qualifiedName,
+ "structure" => app(DatabaseTraverser::class)->getTableStructure(
+ $this->databaseName,
+ $this->tableName
+ ),
+ "data" => $paginated,
+ ];
}
+ // Usage of the DB facade should be avoided since this uses the default config, and not the prequel config. @TODO refactor
return [
"table" => $this->qualifiedName,
"structure" => app(DatabaseTraverser::class)->getTableStructure(
$this->databaseName,
$this->tableName
),
- "data" => $tableData,
+ "data" => DB::table($this->qualifiedName)->paginate(100),
];
}
/**
* Get count of rows in table
* Not yet used.
- *
* @return array
*/
- public function countTableRecords() :array
+ public function countTableRecords(): array
{
$count = DB::table($this->qualifiedName)
- ->count('id');
+ ->count('id');
return [
"table" => $this->qualifiedName,
@@ -106,23 +114,19 @@ public function countTableRecords() :array
/**
* Find given value in given column with given operator.
- *
- * @TODO Clean up, this is nowhere near production ready
+ * @TODO Clean up.
* @return mixed
*/
public function findInTable()
{
$column = (string)Route::current()->parameter('column');
- $value = (string)Route::current()->parameter('value');
$queryType = (string)Route::current()->parameter('type');
+ $value = (string)Route::current()->parameter('value');
+ $value = ($queryType === 'LIKE') ? '%' . $value . '%' : $value;
- $value = ($queryType === 'LIKE') ? '%'.$value.'%' : $value;
-
- return $this->model
- ? $this->model->where($column, $queryType, $value)
- ->paginate(config('prequel.pagination'))
- : DB::table($this->qualifiedName)
- ->where($column, $queryType, $value)
- ->paginate(config('prequel.pagination'));
+ // Usage of the DB facade should be avoided since this uses the default config, and not the prequel config. @TODO refactor
+ return DB::table($this->qualifiedName)
+ ->where($column, $queryType, $value)
+ ->paginate(config('prequel.pagination'));
}
}
diff --git a/src/Http/Middleware/Authorised.php b/src/Http/Middleware/Authorised.php
index 0954a07..3e24a71 100755
--- a/src/Http/Middleware/Authorised.php
+++ b/src/Http/Middleware/Authorised.php
@@ -10,7 +10,6 @@
/**
* Class Authorised
- *
* @package Protoqol\Prequel\Http\Middleware
*/
class Authorised
@@ -20,15 +19,15 @@ class Authorised
* Handle an incoming request.
* Checks if Prequel is enabled and has a valid database connection.
*
- * @param \Illuminate\Http\Request $request
- * @param \Closure $next
+ * @param \Illuminate\Http\Request $request
+ * @param \Closure $next
*
* @return mixed
*/
public function handle($request, Closure $next)
{
if (!$this->configurationCheck()->enabled) {
- return view('Prequel::error', [
+ return response()->view('Prequel::error', [
'error_detailed' => $this->configurationCheck()->detailed,
'http_code' => 403,
'env' => [
@@ -38,11 +37,11 @@ public function handle($request, Closure $next)
'port' => 'protected',
'user' => 'protected',
],
- ]);
+ ], 403);
}
if (!$this->databaseConnectionCheck()->connected) {
- return view('Prequel::error', [
+ return response()->view('Prequel::error', [
'error_detailed' => $this->databaseConnectionCheck()->detailed,
'http_code' => 503,
'env' => [
@@ -52,7 +51,7 @@ public function handle($request, Closure $next)
'port' => config('prequel.database.port'),
'user' => config('prequel.database.username'),
],
- ]);
+ ], 503);
}
return $next($request);
@@ -60,7 +59,6 @@ public function handle($request, Closure $next)
/**
* Check connection with database
- *
* @return object
*/
private function databaseConnectionCheck()
@@ -85,7 +83,6 @@ private function databaseConnectionCheck()
/**
* Check if Prequel is enabled and/or in development
- *
* @return object
*/
private function configurationCheck()
diff --git a/src/Http/Requests/PrequelDatabaseRequest.php b/src/Http/Requests/PrequelDatabaseRequest.php
index 4d98c95..f8d0d69 100755
--- a/src/Http/Requests/PrequelDatabaseRequest.php
+++ b/src/Http/Requests/PrequelDatabaseRequest.php
@@ -8,7 +8,6 @@
/**
* Class PrequelDatabaseRequest
- *
* @property mixed database
* @property mixed table
* @property mixed model
@@ -20,7 +19,6 @@ class PrequelDatabaseRequest extends FormRequest
/**
* Determine if the user is authorized to make this request.
- *
* @return bool
*/
public function authorize()
@@ -30,21 +28,19 @@ public function authorize()
/**
* Get the validation rules that apply to the request.
- *
* @return array
*/
public function rules()
{
return [
- 'database' => 'string',
- 'table' => 'string',
- 'qualifiedName' => 'string',
+ 'database' => 'required|string',
+ 'table' => 'required|string',
+ 'qualifiedName' => 'required|string',
];
}
/**
* Get the validator instance for the request.
- *
* @return \Illuminate\Contracts\Validation\Validator
*/
public function getValidatorInstance()
@@ -55,22 +51,22 @@ public function getValidatorInstance()
$request['database'] = $this->route('database');
$request['table'] = $this->route('table');
- $request['qualifiedName'] = $request['database'].'.'
- .$request['table'];
+ $request['qualifiedName'] = $request['database'] . '.' . $request['table'];
$request['model'] = app(DatabaseTraverser::class)
->getModel($request['table']);
+
} catch (Exception $exception) {
return parent::getValidatorInstance();
}
$this->getInputSource()->replace($request);
+
return parent::getValidatorInstance();
}
/**
* Get the error messages for the defined validation rules.
- *
* @return array
*/
public function messages()
diff --git a/src/Http/routes.php b/src/Http/routes.php
index 383c510..e48d07d 100755
--- a/src/Http/routes.php
+++ b/src/Http/routes.php
@@ -4,54 +4,46 @@
use Protoqol\Prequel\Classes\App\Migrations;
Route::namespace('Protoqol\Prequel\Http\Controllers')
- ->middleware('Protoqol\Prequel\Http\Middleware\Authorised')
- ->prefix(config('prequel.path'))
- ->name('prequel.')
- ->group(function () {
-
- /**
- * Main view route
- */
- Route::get('/', 'PrequelController@index')->name('index');
-
-
- /**
- * API Routes.
- */
- Route::prefix('prequel-api')->group(function () {
- Route::prefix('database')->group(function () {
-
- // Get data from table, data includes structure, actual data and table name.
- Route::get(
- 'get/{database}/{table}',
- 'DatabaseController@getTableData'
- );
-
- // Get count of total records in table
- // Note: Unused as of yet.
- Route::get(
- 'count/{database}/{table}',
- 'DatabaseController@countTableRecords'
- );
-
- // Find data with given input
- Route::get(
- 'find/{database}/{table}/{column}/{type}/{value}',
- 'DatabaseController@findInTable'
- );
- });
-
- /**
- * Get app status.
- */
- Route::get('status', 'PrequelController@status');
-
- Route::get('run/migrations', function () {
- return (new Migrations())->run();
- });
-
- Route::get('reset/migrations', function () {
- return (new Migrations())->reset();
- });
- });
- });
+ ->middleware('Protoqol\Prequel\Http\Middleware\Authorised')
+ ->prefix(config('prequel.path'))
+ ->name('prequel.')
+ ->group(function () {
+
+ /**
+ * Main view route
+ */
+ Route::get('/', 'PrequelController@index')->name('index');
+
+
+ /**
+ * API Routes.
+ */
+ Route::prefix('prequel-api')->group(function () {
+ Route::prefix('database')->group(function () {
+
+ // Get data from table, data includes structure, actual data and table name.
+ Route::get('get/{database}/{table}', 'DatabaseController@getTableData');
+
+ // Get count of total records in table
+ // Note: Unused as of yet.
+ Route::get('count/{database}/{table}', 'DatabaseController@countTableRecords');
+
+ // Find data with given input
+ Route::get('find/{database}/{table}/{column}/{type}/{value}', 'DatabaseController@findInTable');
+
+ });
+
+ /**
+ * Get app status.
+ */
+ Route::get('status', 'PrequelController@status');
+
+ Route::get('run/migrations', function () {
+ return (new Migrations())->run();
+ });
+
+ Route::get('reset/migrations', function () {
+ return (new Migrations())->reset();
+ });
+ });
+ });
diff --git a/tests/Feature/IndexTest.php b/tests/Feature/IndexTest.php
index 8e835e8..6b03f83 100644
--- a/tests/Feature/IndexTest.php
+++ b/tests/Feature/IndexTest.php
@@ -21,7 +21,7 @@ public function testIndexIsErrorIfInvalidDatabaseConnection(): void
$response = $this->get(route('prequel.index'));
- $response->assertStatus(200); // 200, even though it's showing an error
+ $response->assertStatus(503);
$response->assertViewIs('Prequel::error');
$response->assertSeeText('Error in Prequel');
$response->assertSeeText('Could not create a valid database connection.');
@@ -32,12 +32,13 @@ public function testIndexIsDeniedWhenPrequelIsDisabled(): void
config(['prequel.enabled' => false]);
$response = $this->get(route('prequel.index'));
- $response->assertStatus(200); // 200, even though it's showing an error
+ $response->assertStatus(403);
$response->assertViewIs('Prequel::error');
$response->assertSeeText('Error in Prequel');
$response->assertSeeText('Prequel has been disabled.');
}
+
// additional tests should be ran that indicate successful connections
// I don't recommend testing with app environment is 'production' because that may cause other side effects
diff --git a/tests/Unit/Classes/Database/SequelAdapterTest.php b/tests/Unit/Classes/Database/SequelAdapterTest.php
index 5515872..7df3fdb 100644
--- a/tests/Unit/Classes/Database/SequelAdapterTest.php
+++ b/tests/Unit/Classes/Database/SequelAdapterTest.php
@@ -45,10 +45,10 @@ public function showDatabasesDataProvider(): array
public function testShowDatabasesThrowsExceptionForUnsupported(): void
{
- //$this->expectException(\Exception::class);
+ // $this->expectException(\Exception::class);
$this->expectExceptionMessage('Selected invalid or unsupported database driver');
- // force config
+ // Force config
config(["database.connections.my-test-here.driver" => 'unsupported-driver']);
$adapter = new SequelAdapter('my-test-here');
diff --git a/webpack.mix.js b/webpack.mix.js
index 1f2f4d1..7a0a53b 100755
--- a/webpack.mix.js
+++ b/webpack.mix.js
@@ -16,7 +16,7 @@ mix.setResourceRoot('packages/protoqol/prequel').
]).
js('resources/assets/js/app.js', 'public').
copy('public', '../../../public/vendor/prequel').
- // browserSync('http://localhost').
+ browserSync('http://localhost').
options({
- purifyCss: true,
+ purifyCss: true,
});