@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | $this->grid->setModel(HomePage::create()); |
| 44 | 44 | |
| 45 | - $this->grid->addDragHandler()->onReorder(function ($order) { |
|
| 45 | + $this->grid->addDragHandler()->onReorder(function($order) { |
|
| 46 | 46 | $result = true; |
| 47 | 47 | foreach (HomePage::create() as $homepage) { |
| 48 | 48 | $homepage['priority'] = array_search($homepage['id'], $order); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $result &= $homepage->save(); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - return $result? $this->notify(__('Homepages reordered!')): $this->notifyError(__('Error saving order!')); |
|
| 53 | + return $result ? $this->notify(__('Homepages reordered!')) : $this->notifyError(__('Error saving order!')); |
|
| 54 | 54 | }); |
| 55 | 55 | } |
| 56 | 56 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | { |
| 64 | 64 | static $cache; |
| 65 | 65 | |
| 66 | - if (! isset($cache)) { |
|
| 66 | + if (!isset($cache)) { |
|
| 67 | 67 | $cache = []; |
| 68 | 68 | foreach (HomePageJoint::collect() as $joint) { |
| 69 | 69 | $cache[$joint->link()] = $joint->caption(); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public static function getUserHomePage() |
| 82 | 82 | { |
| 83 | - if (! $user = Auth::user()) return; |
|
| 83 | + if (!$user = Auth::user()) return; |
|
| 84 | 84 | |
| 85 | 85 | return HomePage::create()->addCondition('role', $user->roles()->pluck('name')->toArray())->loadAny(); |
| 86 | 86 | } |
@@ -92,6 +92,6 @@ discard block |
||
| 92 | 92 | */ |
| 93 | 93 | public static function getUserHomePagePath() |
| 94 | 94 | { |
| 95 | - return self::getUserHomePage()['path']?: self::$defaultPath; |
|
| 95 | + return self::getUserHomePage()['path'] ?: self::$defaultPath; |
|
| 96 | 96 | } |
| 97 | 97 | } |