@@ -15,7 +15,7 @@ |
||
| 15 | 15 | { |
| 16 | 16 | $this->app['view']->addNamespace('CbApiGen', __DIR__.'/views'); |
| 17 | 17 | $this->loadRoutesFrom(__DIR__.'/CbApiGeneratorRoutes.php'); |
| 18 | - $this->loadMigrationsFrom(__DIR__ . '/migrations'); |
|
| 18 | + $this->loadMigrationsFrom(__DIR__.'/migrations'); |
|
| 19 | 19 | app('CbDynamicMenus')->addSuperAdminMenu('CbApiGen::menu'); |
| 20 | 20 | $this->registerModule(); |
| 21 | 21 | } |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | $namespace = cbModulesNS('ApiGeneratorModule'); |
| 4 | 4 | |
| 5 | -Route::group(['middleware' => ['web'], 'namespace' => $namespace], function () { |
|
| 5 | +Route::group(['middleware' => ['web'], 'namespace' => $namespace], function() { |
|
| 6 | 6 | Route::get('api/doc', ['uses' => 'AdminApiGeneratorController@apiDocumentation', 'as' => 'apiDocumentation']); |
| 7 | 7 | Route::get('download-documentation-postman', ['uses' => 'AdminApiGeneratorController@getDownloadPostman', 'as' => 'downloadDocumentationPostman']); |
| 8 | 8 | }); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | 'middleware' => ['web', \Crocodicstudio\Crudbooster\CBCoreModule\middlewares\CBSuperadmin::class], |
| 12 | 12 | 'prefix' => cbAdminPath(), |
| 13 | 13 | 'namespace' => $namespace, |
| 14 | -], function () { |
|
| 14 | +], function() { |
|
| 15 | 15 | Route::get('api-generator', ['uses' => 'AdminApiGeneratorController@getIndex', 'as' => 'AdminApiGeneratorControllerGetIndex']); |
| 16 | 16 | |
| 17 | 17 | Route::get('api-generator/download-postman', 'DownloadPostman@getDownloadPostman')->name('AdminApiGeneratorControllerGetDownloadPostman'); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | /* ROUTER FOR API GENERATOR */ |
| 53 | 53 | |
| 54 | -Route::group(['middleware' => ['api', \Crocodicstudio\Crudbooster\Modules\ApiGeneratorModule\ApiKeysRepository::class], 'namespace' => ctrlNamespace()], function () { |
|
| 54 | +Route::group(['middleware' => ['api', \Crocodicstudio\Crudbooster\Modules\ApiGeneratorModule\ApiKeysRepository::class], 'namespace' => ctrlNamespace()], function() { |
|
| 55 | 55 | //Router for custom api defeault |
| 56 | 56 | $dir = scandir(controllers_dir()); |
| 57 | 57 | foreach ($dir as $Ctrl) { |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | public static function themeColor() |
| 89 | 89 | { |
| 90 | 90 | $cbUser = cbUser(); |
| 91 | - return ($cbUser)?$cbUser->role()->theme_color : 'skin-blue'; |
|
| 91 | + return ($cbUser) ? $cbUser->role()->theme_color : 'skin-blue'; |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | public static function denyAccess() |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | { |
| 106 | 106 | $roleId = cbUser()->cms_roles_id; |
| 107 | 107 | |
| 108 | - return cache()->rememberForever('cb_admin_privileges_roles'. $roleId, function () use ($roleId) { |
|
| 108 | + return cache()->rememberForever('cb_admin_privileges_roles'.$roleId, function() use ($roleId) { |
|
| 109 | 109 | return \DB::table('cms_roles_privileges')->where('cms_roles_id', $roleId)->join('cms_modules', 'cms_modules.id', '=', 'cms_roles_privileges.cms_modules_id')->select('cms_modules.name', 'cms_modules.path', 'can_see_module', 'can_create', 'can_read', 'can_edit', 'can_delete')->get() ?: []; |
| 110 | 110 | }); |
| 111 | 111 | } |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | return redirect()->route("ModulesControllerGetStep1"); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - public function getStep1($id=null,Step1Handler $handler) |
|
| 97 | + public function getStep1($id = null, Step1Handler $handler) |
|
| 98 | 98 | { |
| 99 | 99 | $this->cbLoader(); |
| 100 | 100 | |
@@ -8,10 +8,10 @@ discard block |
||
| 8 | 8 | |
| 9 | 9 | class Step1Handler |
| 10 | 10 | { |
| 11 | - public function showForm($id=null) |
|
| 11 | + public function showForm($id = null) |
|
| 12 | 12 | { |
| 13 | 13 | $data['id'] = $id; |
| 14 | - return view('CbModulesGen::step1',$data); |
|
| 14 | + return view('CbModulesGen::step1', $data); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | public function handleFormSubmit() |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | $icon = request('icon'); |
| 22 | 22 | $path = request('path'); |
| 23 | 23 | |
| 24 | - if (! request('id')) { |
|
| 24 | + if (!request('id')) { |
|
| 25 | 25 | if (ModulesRepo::modulePathExists($path)) { |
| 26 | 26 | //todo: should be translated |
| 27 | 27 | backWithMsg('Sorry the slug has already exists, please choose another !', 'warning'); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | if (file_exists(controller_path($row->controller))) { |
| 40 | 40 | $response = FileManipulator::readCtrlContent(str_replace('.', '', $row->controller)); |
| 41 | - }else{ |
|
| 41 | + } else { |
|
| 42 | 42 | $response = file_get_contents(__DIR__.'Step1Handler.php/'.str_replace('.', '', $row->controller).'.php'); |
| 43 | 43 | } |
| 44 | 44 | |