Passed
Push — master ( ead8c1...2619fb )
by Reza
04:15
created
src/EasyPanelServiceProvider.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
     public function register()
32 32
     {
33 33
         // Here we merge config with 'easy_panel' key
34
-        $this->mergeConfigFrom(__DIR__ . '/../config/easy_panel_config.php', 'easy_panel');
34
+        $this->mergeConfigFrom(__DIR__.'/../config/easy_panel_config.php', 'easy_panel');
35 35
 
36 36
         // Check the status of module
37
-        if(!config('easy_panel.enable')) {
37
+        if (!config('easy_panel.enable')) {
38 38
             return;
39 39
         }
40 40
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     public function boot()
46 46
     {
47
-        if(!config('easy_panel.enable')) {
47
+        if (!config('easy_panel.enable')) {
48 48
             return;
49 49
         }
50 50
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         $this->bindCommands();
58 58
 
59 59
         // Load Views with 'admin::' prefix
60
-        $this->loadViewsFrom(__DIR__ . '/../resources/views', 'admin');
60
+        $this->loadViewsFrom(__DIR__.'/../resources/views', 'admin');
61 61
 
62 62
         // Register Middleware
63 63
         $this->registerMiddlewareAlias();
@@ -76,13 +76,13 @@  discard block
 block discarded – undo
76 76
 
77 77
     private function defineRoutes()
78 78
     {
79
-        if(!$this->app->routesAreCached()) {
79
+        if (!$this->app->routesAreCached()) {
80 80
             $middlewares = array_merge(['web', 'isAdmin', 'LangChanger'], config('easy_panel.additional_middlewares'));
81 81
 
82 82
             Route::prefix(config('easy_panel.route_prefix'))
83 83
                 ->middleware($middlewares)
84
-                ->name(getRouteName() . '.')
85
-                ->group(__DIR__ . '/routes.php');
84
+                ->name(getRouteName().'.')
85
+                ->group(__DIR__.'/routes.php');
86 86
         }
87 87
     }
88 88
 
@@ -119,15 +119,15 @@  discard block
 block discarded – undo
119 119
 
120 120
     private function mergePublishes()
121 121
     {
122
-        $this->publishes([__DIR__ . '/../config/easy_panel_config.php' => config_path('easy_panel.php')], 'easy-panel-config');
122
+        $this->publishes([__DIR__.'/../config/easy_panel_config.php' => config_path('easy_panel.php')], 'easy-panel-config');
123 123
 
124
-        $this->publishes([__DIR__ . '/../resources/views' => resource_path('/views/vendor/admin')], 'easy-panel-views');
124
+        $this->publishes([__DIR__.'/../resources/views' => resource_path('/views/vendor/admin')], 'easy-panel-views');
125 125
 
126
-        $this->publishes([__DIR__ . '/../resources/assets' => public_path('/assets/admin')], 'easy-panel-styles');
126
+        $this->publishes([__DIR__.'/../resources/assets' => public_path('/assets/admin')], 'easy-panel-styles');
127 127
 
128 128
         $this->publishes([
129
-            __DIR__ . '/../database/migrations/cruds_table.php' => base_path('/database/migrations/' . date('Y_m_d') . '_999999_create_cruds_table_easypanel.php'),
130
-            __DIR__ . '/../database/migrations/panel_admins_table.php' => base_path('/database/migrations/' . date('Y_m_d') . '_999999_create_panel_admins_table_easypanel.php'),
129
+            __DIR__.'/../database/migrations/cruds_table.php' => base_path('/database/migrations/'.date('Y_m_d').'_999999_create_cruds_table_easypanel.php'),
130
+            __DIR__.'/../database/migrations/panel_admins_table.php' => base_path('/database/migrations/'.date('Y_m_d').'_999999_create_panel_admins_table_easypanel.php'),
131 131
         ], 'easy-panel-migration');
132 132
 
133 133
         $this->publishes([__DIR__.'/../resources/lang' => app()->langPath()], 'easy-panel-lang');
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     {
161 161
         $model = !$this->app->runningUnitTests() ? config('easy_panel.user_model') : User::class;
162 162
 
163
-        $model::resolveRelationUsing('panelAdmin', function ($userModel){
163
+        $model::resolveRelationUsing('panelAdmin', function($userModel) {
164 164
             return $userModel->hasOne(PanelAdmin::class)->latest();
165 165
         });
166 166
     }
Please login to merge, or discard this patch.