@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | 'prefix' => trim(config('dbm.prefix')), |
5 | 5 | 'middleware' => 'auth:api', |
6 | 6 | 'namespace' => config('dbm.controller_namespace'), |
7 | -], function () { |
|
7 | +], function() { |
|
8 | 8 | |
9 | 9 | // Helpers Route |
10 | 10 | Route::get('assets', 'ManagerController@assets')->name('dbm.asset'); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | Route::put('/relationship', 'RelationController@update'); |
45 | 45 | Route::delete('/relationship', 'RelationController@delete'); |
46 | 46 | // Table |
47 | - Route::group(['prefix' => 'table'], function () { |
|
47 | + Route::group(['prefix' => 'table'], function() { |
|
48 | 48 | Route::get('/details/{table}', 'RecordController@getTableDetails'); |
49 | 49 | Route::get('/columns/{table}', 'TableController@getTableColumns'); |
50 | 50 | }); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | Route::group([ |
58 | 58 | 'prefix' => trim(config('dbm.prefix')), |
59 | 59 | 'namespace' => config('dbm.controller_namespace'), |
60 | -], function () { |
|
60 | +], function() { |
|
61 | 61 | // User |
62 | 62 | Route::post('/login', 'UserController@login'); |
63 | 63 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -Route::group(['prefix' => trim(config('dbm.prefix')), 'namespace' => config('dbm.controller_namespace')], function () { |
|
3 | +Route::group(['prefix' => trim(config('dbm.prefix')), 'namespace' => config('dbm.controller_namespace')], function() { |
|
4 | 4 | //Database Table |
5 | 5 | Route::get('/', 'DatabaseController@index'); |
6 | 6 | Route::get('table/builder/{name}', 'DatabaseController@index'); |
@@ -1,40 +1,40 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! function_exists('dbm_asset')) { |
|
3 | +if (!function_exists('dbm_asset')) { |
|
4 | 4 | function dbm_asset($path, $secure = null) |
5 | 5 | { |
6 | 6 | return route('dbm.asset').'?path='.urlencode($path); |
7 | 7 | } |
8 | 8 | } |
9 | 9 | |
10 | -if (! function_exists('dbm_driver')) { |
|
10 | +if (!function_exists('dbm_driver')) { |
|
11 | 11 | function dbm_driver() |
12 | 12 | { |
13 | 13 | return (config('database.default') != '') ? config('database.default') : 'mysql'; |
14 | 14 | } |
15 | 15 | } |
16 | 16 | |
17 | -if (! function_exists('dbm_prefix')) { |
|
17 | +if (!function_exists('dbm_prefix')) { |
|
18 | 18 | function dbm_prefix() |
19 | 19 | { |
20 | 20 | return (config('dbm.prefix') != '') ? config('dbm.prefix') : ''; |
21 | 21 | } |
22 | 22 | } |
23 | 23 | |
24 | -if(! function_exists('dbm_base_path')) { |
|
25 | - function dbm_base_path(){ |
|
24 | +if (!function_exists('dbm_base_path')) { |
|
25 | + function dbm_base_path() { |
|
26 | 26 | return rtrim(config('dbm.base_path'), '/') ?? ''; |
27 | 27 | } |
28 | 28 | } |
29 | 29 | |
30 | -if (! function_exists('is_json')) { |
|
30 | +if (!function_exists('is_json')) { |
|
31 | 31 | function is_json($string) |
32 | 32 | { |
33 | 33 | return is_string($string) && is_array(json_decode($string, true)) && (json_last_error() == JSON_ERROR_NONE) ? true : false; |
34 | 34 | } |
35 | 35 | } |
36 | 36 | |
37 | -if (! function_exists('save_json')) { |
|
37 | +if (!function_exists('save_json')) { |
|
38 | 38 | function save_json(array $arr) |
39 | 39 | { |
40 | 40 | $jsonArr = []; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | } |
48 | 48 | } |
49 | 49 | |
50 | -if (! function_exists('retreive_json')) { |
|
50 | +if (!function_exists('retreive_json')) { |
|
51 | 51 | function retreive_json(string $str) |
52 | 52 | { |
53 | 53 | $jsonData = json_decode($str, true); |