@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -\Validator::extend('alpha_spaces', function ($attribute, $value) { |
|
3 | +\Validator::extend('alpha_spaces', function($attribute, $value) { |
|
4 | 4 | // This will only accept alpha and spaces. |
5 | 5 | // If you want to accept hyphens use: /^[\pL\s-]+$/u. |
6 | 6 | return preg_match('/^[\pL\s]+$/u', $value); |
7 | 7 | },'The :attribute should be letters and spaces only'); |
8 | 8 | |
9 | -\Validator::extend('alpha_num_spaces', function ($attribute, $value) { |
|
9 | +\Validator::extend('alpha_num_spaces', function($attribute, $value) { |
|
10 | 10 | // This will only accept alphanumeric and spaces. |
11 | 11 | return preg_match('/^[a-zA-Z0-9\s]+$/', $value); |
12 | 12 | },'The :attribute should be alphanumeric characters and spaces only'); |
13 | 13 | \ No newline at end of file |
@@ -18,8 +18,8 @@ |
||
18 | 18 | public function handle($request, Closure $next) |
19 | 19 | { |
20 | 20 | |
21 | - if(!session()->has("developer")) { |
|
22 | - return cb()->redirect(cb()->getDeveloperUrl("login"),"Please login for first"); |
|
21 | + if (!session()->has("developer")) { |
|
22 | + return cb()->redirect(cb()->getDeveloperUrl("login"), "Please login for first"); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | return $next($request); |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::table('users', function (Blueprint $table) { |
|
15 | + Schema::table('users', function(Blueprint $table) { |
|
16 | 16 | $table->string('photo')->nullable(); |
17 | 17 | $table->integer('cb_roles_id'); |
18 | 18 | }); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function down() |
27 | 27 | { |
28 | - Schema::table('users', function (Blueprint $table) { |
|
28 | + Schema::table('users', function(Blueprint $table) { |
|
29 | 29 | $table->dropColumn('cb_roles_id'); |
30 | 30 | $table->dropColumn('photo'); |
31 | 31 | }); |
@@ -2,8 +2,8 @@ discard block |
||
2 | 2 | namespace crocodicstudio\crudbooster\fonts; |
3 | 3 | |
4 | 4 | class Fontawesome { |
5 | - public static function getIcons() { |
|
6 | - return [ |
|
5 | + public static function getIcons() { |
|
6 | + return [ |
|
7 | 7 | "glass", |
8 | 8 | "music", |
9 | 9 | "search", |
@@ -699,5 +699,5 @@ discard block |
||
699 | 699 | "bluetooth-b", |
700 | 700 | "percent", |
701 | 701 | ]; |
702 | - } |
|
702 | + } |
|
703 | 703 | } |
704 | 704 | \ No newline at end of file |
@@ -4,7 +4,7 @@ |
||
4 | 4 | interface CBHook { |
5 | 5 | |
6 | 6 | public function hookGetLogin(); |
7 | - public function hookPostLogin(); |
|
8 | - public function beforeBackendMiddleware($request); |
|
7 | + public function hookPostLogin(); |
|
8 | + public function beforeBackendMiddleware($request); |
|
9 | 9 | public function afterBackendMiddleware($request, $response); |
10 | 10 | } |
11 | 11 | \ No newline at end of file |
@@ -24,11 +24,11 @@ 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'); |
|
31 | - $this->publishes([__DIR__ . '/assets' =>public_path('cb_asset')],'cb_asset'); |
|
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 | + $this->publishes([__DIR__.'/assets' =>public_path('cb_asset')], 'cb_asset'); |
|
32 | 32 | |
33 | 33 | require __DIR__.'/validations/validation.php'; |
34 | 34 | require __DIR__.'/routes.php'; |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | require __DIR__.'/helpers/Helper.php'; |
45 | 45 | |
46 | 46 | // Singletons |
47 | - $this->app->singleton('crudbooster', function () |
|
47 | + $this->app->singleton('crudbooster', function() |
|
48 | 48 | { |
49 | 49 | return true; |
50 | 50 | }); |
51 | 51 | $this->app->singleton('ColumnSingleton', ColumnSingleton::class); |
52 | 52 | |
53 | 53 | // Merging configuration |
54 | - $this->mergeConfigFrom(__DIR__.'/configs/crudbooster.php','crudbooster'); |
|
54 | + $this->mergeConfigFrom(__DIR__.'/configs/crudbooster.php', 'crudbooster'); |
|
55 | 55 | |
56 | 56 | |
57 | 57 | // Register Commands |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('cb_role_privileges', function (Blueprint $table) { |
|
15 | + Schema::create('cb_role_privileges', function(Blueprint $table) { |
|
16 | 16 | $table->increments("id"); |
17 | 17 | $table->integer("cb_roles_id"); |
18 | 18 | $table->integer("cb_menus_id"); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('cb_roles', function (Blueprint $table) { |
|
15 | + Schema::create('cb_roles', function(Blueprint $table) { |
|
16 | 16 | $table->increments("id"); |
17 | 17 | $table->string('name'); |
18 | 18 | }); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('cb_modules', function (Blueprint $table) { |
|
15 | + Schema::create('cb_modules', function(Blueprint $table) { |
|
16 | 16 | $table->increments("id"); |
17 | 17 | $table->string('name'); |
18 | 18 | $table->string("icon"); |