@@ -240,8 +240,9 @@ |
||
| 240 | 240 | { |
| 241 | 241 | $results = $this->belongsToMany('App\Menu', 'Menu_User', 'user', 'menu')->withTimestamps()->where('pos', $pos)->get(); |
| 242 | 242 | |
| 243 | - foreach ($this->groups as $group) |
|
| 244 | - $results->merge($group->menus->where('pos', $pos)); |
|
| 243 | + foreach ($this->groups as $group) { |
|
| 244 | + $results->merge($group->menus->where('pos', $pos)); |
|
| 245 | + } |
|
| 245 | 246 | |
| 246 | 247 | return $results; |
| 247 | 248 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | // Normalize into a six character long hex string |
| 12 | 12 | $hex = str_replace('#', '', $hex); |
| 13 | 13 | if (strlen($hex) == 3) { |
| 14 | - $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2); |
|
| 14 | + $hex = str_repeat(substr($hex, 0, 1), 2) . str_repeat(substr($hex, 1, 1), 2) . str_repeat(substr($hex, 2, 1), 2); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | // Split into three parts: R, G and B |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | foreach ($color_parts as $color) { |
| 22 | 22 | $color = hexdec($color); // Convert to decimal |
| 23 | - $color = max(0,min(255,$color + $steps)); // Adjust color |
|
| 23 | + $color = max(0, min(255, $color + $steps)); // Adjust color |
|
| 24 | 24 | $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code |
| 25 | 25 | } |
| 26 | 26 | |
@@ -19,12 +19,12 @@ discard block |
||
| 19 | 19 | // Publish our views |
| 20 | 20 | $this->loadViewsFrom(base_path("resources/views"), 'base'); |
| 21 | 21 | $this->publishes([ |
| 22 | - __DIR__ . '/views' => base_path("resources/views") |
|
| 22 | + __DIR__ . '/views' => base_path("resources/views") |
|
| 23 | 23 | ]); |
| 24 | 24 | |
| 25 | 25 | // Publish our migrations |
| 26 | 26 | $this->publishes([ |
| 27 | - __DIR__ . '/migrations' => base_path("database/migrations") |
|
| 27 | + __DIR__ . '/migrations' => base_path("database/migrations") |
|
| 28 | 28 | ], 'migrations'); |
| 29 | 29 | |
| 30 | 30 | // Publish a config file |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | public function register() |
| 42 | 42 | { |
| 43 | 43 | // Bind the |
| 44 | - $this->app->bind('base', function($app){ |
|
| 44 | + $this->app->bind('base', function($app) { |
|
| 45 | 45 | return new base; |
| 46 | 46 | }); |
| 47 | 47 | } |