@@ 82-94 (lines=13) @@ | ||
79 | * |
|
80 | * @return array |
|
81 | */ |
|
82 | protected static function setIconAttribute(array $properties) |
|
83 | { |
|
84 | $icon = array_get($properties, 'attributes.icon'); |
|
85 | if (!is_null($icon)) { |
|
86 | $properties['icon'] = $icon; |
|
87 | ||
88 | array_forget($properties, 'attributes.icon'); |
|
89 | ||
90 | return $properties; |
|
91 | } |
|
92 | ||
93 | return $properties; |
|
94 | } |
|
95 | ||
96 | /** |
|
97 | * Get random name. |
|
@@ 648-660 (lines=13) @@ | ||
645 | * |
|
646 | * @return array |
|
647 | */ |
|
648 | protected static function setAuthAttribute(array $properties) |
|
649 | { |
|
650 | $auth = array_get($properties, 'attributes.auth'); |
|
651 | if ($auth) { |
|
652 | $properties['auth'] = (bool) $auth; |
|
653 | ||
654 | array_forget($properties, 'attributes.auth'); |
|
655 | ||
656 | return $properties; |
|
657 | } |
|
658 | ||
659 | return $properties; |
|
660 | } |
|
661 | } |
|
662 |