@@ -91,7 +91,7 @@ |
||
91 | 91 | <a href="%s"><i class="%s text-red"></i><span>%s</span></a> |
92 | 92 | ' // url, icon, title |
93 | 93 | ]; |
94 | - $traverse = function ($rows) use (&$traverse, $templates, $user) { |
|
94 | + $traverse = function($rows) use (&$traverse, $templates, $user) { |
|
95 | 95 | $menuString = ""; |
96 | 96 | $hasActive = false; |
97 | 97 | foreach ($rows as $menu) { |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | -Route::group(['namespace' => '\Afrittella\BackProject\Http\Controllers'], function () { |
|
3 | - Route::group(['middleware' => 'web'], function () { |
|
2 | +Route::group(['namespace' => '\Afrittella\BackProject\Http\Controllers'], function() { |
|
3 | + Route::group(['middleware' => 'web'], function() { |
|
4 | 4 | Route::get('confirm/{code}/{user}', 'Auth\RegisterController@confirm')->name('users.confirm'); |
5 | 5 | Route::auth(); |
6 | 6 | |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | Route::get('auth/{provider}/callback', 'Auth\SocialLoginController@handleProviderCallback')->name('social_callback'); |
9 | 9 | }); |
10 | 10 | |
11 | - Route::group(['middleware' => 'web', 'prefix' => config('back-project.route_prefix')], function () { |
|
11 | + Route::group(['middleware' => 'web', 'prefix' => config('back-project.route_prefix')], function() { |
|
12 | 12 | Route::get('dashboard', 'AdminController@dashboard')->name('admin.dashboard'); |
13 | 13 | Route::get('account', 'UsersController@account')->name('admin.account'); |
14 | 14 | Route::put('account', 'UsersController@accountStore')->name('admin.add-account'); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | Route::get('attachments/{attachment}/main', 'AttachmentsController@setMain')->name('attachments.main'); |
19 | 19 | Route::resource('attachments', 'AttachmentsController', ['except' => ['destroy', 'show']]); |
20 | 20 | // Users |
21 | - Route::group(['middleware' => 'role:administrator'], function () { |
|
21 | + Route::group(['middleware' => 'role:administrator'], function() { |
|
22 | 22 | Route::get('users/{user}/delete', 'UsersController@delete')->name('users.delete'); // Implementing delete avoiding DELETE method |
23 | 23 | Route::resource('users', 'UsersController', ['except' => ['destroy', 'show']]); |
24 | 24 |
@@ -33,13 +33,13 @@ discard block |
||
33 | 33 | // - first the published views (in case they have any changes) |
34 | 34 | $this->loadViewsFrom(resource_path('views/vendor/back-project/base'), 'back-project'); |
35 | 35 | // - then the stock views that come with the package, in case a published view might be missing |
36 | - $this->loadViewsFrom(__DIR__ . '/../resources/views', 'back-project'); |
|
36 | + $this->loadViewsFrom(__DIR__.'/../resources/views', 'back-project'); |
|
37 | 37 | // Load Translations |
38 | - $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'back-project'); |
|
38 | + $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'back-project'); |
|
39 | 39 | |
40 | 40 | // use the vendor configuration file as fallback |
41 | 41 | $this->mergeConfigFrom( |
42 | - __DIR__ . '/../config/config.php', 'back-project' |
|
42 | + __DIR__.'/../config/config.php', 'back-project' |
|
43 | 43 | ); |
44 | 44 | |
45 | 45 | $this->routes($router); |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | return new BackProject($app); |
64 | 64 | });*/ |
65 | 65 | |
66 | - $this->app->singleton('attachments-manager', function ($app) { |
|
66 | + $this->app->singleton('attachments-manager', function($app) { |
|
67 | 67 | return new MediaManager(); |
68 | 68 | }); |
69 | 69 | |
70 | - $this->app->singleton('back-project', function ($app) { |
|
70 | + $this->app->singleton('back-project', function($app) { |
|
71 | 71 | return new BackProject(); |
72 | 72 | }); |
73 | 73 | |
@@ -104,15 +104,15 @@ discard block |
||
104 | 104 | public function publishFiles() |
105 | 105 | { |
106 | 106 | // publish config file |
107 | - $this->publishes([__DIR__ . '/../config/config.php' => config_path() . '/back-project.php'], 'config'); |
|
107 | + $this->publishes([__DIR__.'/../config/config.php' => config_path().'/back-project.php'], 'config'); |
|
108 | 108 | // publish lang files |
109 | - $this->publishes([__DIR__ . '/../resources/lang' => resource_path('lang/vendor/back-project')], 'lang'); |
|
109 | + $this->publishes([__DIR__.'/../resources/lang' => resource_path('lang/vendor/back-project')], 'lang'); |
|
110 | 110 | // publish public BackProject assets |
111 | - $this->publishes([__DIR__ . '/../public' => public_path('vendor/back-project')], 'public'); |
|
111 | + $this->publishes([__DIR__.'/../public' => public_path('vendor/back-project')], 'public'); |
|
112 | 112 | // publish views |
113 | - $this->publishes([__DIR__ . '/../resources/views' => resource_path('views/vendor/back-project')], 'views'); |
|
113 | + $this->publishes([__DIR__.'/../resources/views' => resource_path('views/vendor/back-project')], 'views'); |
|
114 | 114 | // publish error views |
115 | - $this->publishes([__DIR__ . '/../resources/error_views' => resource_path('views/errors')], 'errors'); |
|
115 | + $this->publishes([__DIR__.'/../resources/error_views' => resource_path('views/errors')], 'errors'); |
|
116 | 116 | // publish public AdminLTE assets |
117 | 117 | $this->publishes(['vendor/almasaeed2010/adminlte/bootstrap' => public_path('vendor/adminlte/bootstrap')], 'adminlte'); |
118 | 118 | $this->publishes(['vendor/almasaeed2010/adminlte/dist' => public_path('vendor/adminlte/dist')], 'adminlte'); |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | //$router->aliasMiddleware('guest', \Afrittella\BackProject\Http\Middleware\RedirectIfAuthenticated::class); |
128 | 128 | $router->aliasMiddleware('role', \Afrittella\BackProject\Http\Middleware\Role::class); |
129 | 129 | |
130 | - $this->loadRoutesFrom(__DIR__ . '/../routes/web.php'); |
|
130 | + $this->loadRoutesFrom(__DIR__.'/../routes/web.php'); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | public function handleMigrations() |
@@ -137,8 +137,8 @@ discard block |
||
137 | 137 | $timestamp = date('Y_m_d_His', time()); |
138 | 138 | |
139 | 139 | $this->publishes([ |
140 | - __DIR__ . '/../database/migrations/' . $file . '.php' => |
|
141 | - database_path('migrations/' . $timestamp . '_' . $file . '.php') |
|
140 | + __DIR__.'/../database/migrations/'.$file.'.php' => |
|
141 | + database_path('migrations/'.$timestamp.'_'.$file.'.php') |
|
142 | 142 | ], 'migrations'); |
143 | 143 | } |
144 | 144 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | public function loadHelpers() |
179 | 179 | { |
180 | 180 | foreach ($this->helpers as $helper): |
181 | - $file = __DIR__ . '/Helpers/' . $helper . '.php'; |
|
181 | + $file = __DIR__.'/Helpers/'.$helper.'.php'; |
|
182 | 182 | |
183 | 183 | if (file_exists($file)) { |
184 | 184 | require_once($file); |