@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('cb_menus', function (Blueprint $table) { |
|
| 15 | + Schema::create('cb_menus', function(Blueprint $table) { |
|
| 16 | 16 | $table->increments(); |
| 17 | 17 | $table->string('name'); |
| 18 | 18 | $table->string("icon"); |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function assignment($value, ColumnModel $column) |
| 22 | 22 | { |
| 23 | - return implode(";", request( $column->getName() )); |
|
| 23 | + return implode(";", request($column->getName())); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | } |
| 27 | 27 | \ No newline at end of file |
@@ -24,13 +24,13 @@ discard block |
||
| 24 | 24 | $this->loadViewsFrom(__DIR__.'/types', 'types'); |
| 25 | 25 | |
| 26 | 26 | // Publish the files |
| 27 | - $this->publishes([__DIR__.'/configs/crudbooster.php' => config_path('crudbooster.php')],'cb_config'); |
|
| 27 | + $this->publishes([__DIR__.'/configs/crudbooster.php' => config_path('crudbooster.php')], 'cb_config'); |
|
| 28 | 28 | $this->publishes([__DIR__.'/localization' => resource_path('lang')], 'cb_localization'); |
| 29 | - $this->publishes([__DIR__.'/database' => base_path('database')],'cb_migration'); |
|
| 30 | - $this->publishes([__DIR__.'/templates/CBHook.stub'=> app_path('Http/CBHook.php')],'cb_hook'); |
|
| 29 | + $this->publishes([__DIR__.'/database' => base_path('database')], 'cb_migration'); |
|
| 30 | + $this->publishes([__DIR__.'/templates/CBHook.stub'=> app_path('Http/CBHook.php')], 'cb_hook'); |
|
| 31 | 31 | $this->publishes([ |
| 32 | - __DIR__ . '/assets' =>public_path('cb_asset') |
|
| 33 | - ],'cb_asset'); |
|
| 32 | + __DIR__.'/assets' =>public_path('cb_asset') |
|
| 33 | + ], 'cb_asset'); |
|
| 34 | 34 | |
| 35 | 35 | require __DIR__.'/validations/validation.php'; |
| 36 | 36 | require __DIR__.'/routes.php'; |
@@ -46,14 +46,14 @@ discard block |
||
| 46 | 46 | require __DIR__.'/helpers/Helper.php'; |
| 47 | 47 | |
| 48 | 48 | // Singletons |
| 49 | - $this->app->singleton('crudbooster', function () |
|
| 49 | + $this->app->singleton('crudbooster', function() |
|
| 50 | 50 | { |
| 51 | 51 | return true; |
| 52 | 52 | }); |
| 53 | 53 | $this->app->singleton('ColumnSingleton', ColumnSingleton::class); |
| 54 | 54 | |
| 55 | 55 | // Merging configuration |
| 56 | - $this->mergeConfigFrom(__DIR__.'/configs/crudbooster.php','crudbooster'); |
|
| 56 | + $this->mergeConfigFrom(__DIR__.'/configs/crudbooster.php', 'crudbooster'); |
|
| 57 | 57 | |
| 58 | 58 | |
| 59 | 59 | // Register Commands |
@@ -1,30 +1,30 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | // Developer Backend Middleware |
| 4 | -Route::group(['middleware' => ['web',\crocodicstudio\crudbooster\middlewares\CBDeveloper::class], |
|
| 4 | +Route::group(['middleware' => ['web', \crocodicstudio\crudbooster\middlewares\CBDeveloper::class], |
|
| 5 | 5 | 'prefix'=>cbConfig('DEV_PATH'), |
| 6 | - 'namespace' => 'crocodicstudio\crudbooster\controllers'], function () { |
|
| 6 | + 'namespace' => 'crocodicstudio\crudbooster\controllers'], function() { |
|
| 7 | 7 | cb()->routeController("modules", "DeveloperModulesController"); |
| 8 | 8 | cb()->routeController("menus", "DeveloperMenusController"); |
| 9 | - cb()->routeController("roles","DeveloperRolesController"); |
|
| 9 | + cb()->routeController("roles", "DeveloperRolesController"); |
|
| 10 | 10 | }); |
| 11 | 11 | |
| 12 | 12 | // Developer Auth Middleware |
| 13 | 13 | Route::group(['middleware' => ['web'], |
| 14 | 14 | 'prefix'=>cbConfig('DEV_PATH'), |
| 15 | - 'namespace' => 'crocodicstudio\crudbooster\controllers'], function () { |
|
| 16 | - Route::post("login","AdminAuthController@postLoginDeveloper"); |
|
| 17 | - Route::get("login","AdminAuthController@getLoginDeveloper"); |
|
| 18 | - Route::get("logout","AdminAuthController@getLogoutDeveloper"); |
|
| 15 | + 'namespace' => 'crocodicstudio\crudbooster\controllers'], function() { |
|
| 16 | + Route::post("login", "AdminAuthController@postLoginDeveloper"); |
|
| 17 | + Route::get("login", "AdminAuthController@getLoginDeveloper"); |
|
| 18 | + Route::get("logout", "AdminAuthController@getLogoutDeveloper"); |
|
| 19 | 19 | }); |
| 20 | 20 | |
| 21 | 21 | // Routing without any middleware |
| 22 | -Route::group(['middleware' => ['web'], 'namespace' => '\crocodicstudio\crudbooster\controllers'], function () { |
|
| 22 | +Route::group(['middleware' => ['web'], 'namespace' => '\crocodicstudio\crudbooster\controllers'], function() { |
|
| 23 | 23 | Route::get('uploads/{one?}/{two?}/{three?}/{four?}/{five?}', ['uses' => 'FileController@getPreview', 'as' => 'fileControllerPreview']); |
| 24 | 24 | }); |
| 25 | 25 | |
| 26 | 26 | // Routing without any middleware with admin prefix |
| 27 | -Route::group(['middleware' => ['web'], 'prefix' => cbConfig('ADMIN_PATH'), 'namespace' => 'crocodicstudio\crudbooster\controllers'], function () { |
|
| 27 | +Route::group(['middleware' => ['web'], 'prefix' => cbConfig('ADMIN_PATH'), 'namespace' => 'crocodicstudio\crudbooster\controllers'], function() { |
|
| 28 | 28 | Route::get('logout', ['uses' => 'AdminAuthController@getLogout', 'as' => 'getLogout']); |
| 29 | 29 | Route::post('login', ['uses' => 'AdminAuthController@postLogin', 'as' => 'postLogin']); |
| 30 | 30 | Route::get('login', ['uses' => 'AdminAuthController@getLogin', 'as' => 'getLogin']); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | 'middleware' => ['web', \crocodicstudio\crudbooster\middlewares\CBBackend::class], |
| 36 | 36 | 'prefix' => cbConfig('ADMIN_PATH'), |
| 37 | 37 | 'namespace' => 'crocodicstudio\crudbooster\controllers', |
| 38 | -], function () { |
|
| 38 | +], function() { |
|
| 39 | 39 | cb()->routeController('profile', 'AdminProfileController'); |
| 40 | 40 | }); |
| 41 | 41 | |
@@ -44,22 +44,22 @@ discard block |
||
| 44 | 44 | 'middleware' => ['web', \crocodicstudio\crudbooster\middlewares\CBBackend::class], |
| 45 | 45 | 'prefix' => cbConfig('ADMIN_PATH'), |
| 46 | 46 | 'namespace' => 'App\Http\Controllers', |
| 47 | -], function () { |
|
| 47 | +], function() { |
|
| 48 | 48 | |
| 49 | 49 | if (Request::is(cbConfig('ADMIN_PATH'))) { |
| 50 | - if($dashboard = cbConfig("ADMIN_DASHBOARD_CONTROLLER")) { |
|
| 50 | + if ($dashboard = cbConfig("ADMIN_DASHBOARD_CONTROLLER")) { |
|
| 51 | 51 | Route::get("/", $dashboard); |
| 52 | - }else{ |
|
| 52 | + } else { |
|
| 53 | 53 | Route::get("/", "crocodicstudio\crudbooster\controllers\AdminDashboardController@getIndex"); |
| 54 | 54 | } |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | $controllers = glob(app_path('Http/Controllers/Admin*Controller.php')); |
| 58 | - foreach($controllers as $controller) { |
|
| 58 | + foreach ($controllers as $controller) { |
|
| 59 | 59 | $controllerName = basename($controller); |
| 60 | 60 | $className = '\App\Http\Controllers\\'.$controllerName; |
| 61 | 61 | $controllerClass = new $className(); |
| 62 | - if(method_exists($controllerClass, 'cbInit')) { |
|
| 62 | + if (method_exists($controllerClass, 'cbInit')) { |
|
| 63 | 63 | cb()->routeController($controllerClass->getData('permalink'), $controllerName); |
| 64 | 64 | } |
| 65 | 65 | } |