@@ -133,49 +133,3 @@ |
||
| 133 | 133 | public function getTypeBadgeAttribute(): string |
| 134 | 134 | { |
| 135 | 135 | return sprintf(<<<'html' |
| 136 | - <span class="badge badge-%s"> |
|
| 137 | - <i class="fa fa-%s"></i> %s |
|
| 138 | - </span> |
|
| 139 | - html, |
|
| 140 | - $this->type->isCoin() ? 'danger' : 'success', |
|
| 141 | - $this->type->isCoin() ? 'coins' : 'money-bill', |
|
| 142 | - $this->type->label |
|
| 143 | - ); |
|
| 144 | - } |
|
| 145 | - |
|
| 146 | - /** |
|
| 147 | - * Return "can_order_custom_quantity_badge" attribute value. |
|
| 148 | - * |
|
| 149 | - * @return string |
|
| 150 | - */ |
|
| 151 | - public function getCanOrderCustomQuantityBadgeAttribute(): string |
|
| 152 | - { |
|
| 153 | - return sprintf(<<<'html' |
|
| 154 | - <span class="badge badge-%s"> |
|
| 155 | - <i class="fa fa-%s"></i> %s |
|
| 156 | - </span> |
|
| 157 | - html, |
|
| 158 | - $this->can_order_custom_quantity ? 'success' : 'danger', |
|
| 159 | - $this->can_order_custom_quantity ? 'check-circle' : 'times-circle', |
|
| 160 | - $this->can_order_custom_quantity ? trans('Yes') : trans('No') |
|
| 161 | - ); |
|
| 162 | - } |
|
| 163 | - |
|
| 164 | - /** |
|
| 165 | - * Return "is_visible_badge" attribute value. |
|
| 166 | - * |
|
| 167 | - * @return string |
|
| 168 | - */ |
|
| 169 | - public function getIsVisibleBadgeAttribute(): string |
|
| 170 | - { |
|
| 171 | - return sprintf(<<<'html' |
|
| 172 | - <span class="badge badge-%s"> |
|
| 173 | - <i class="fa fa-%s"></i> %s |
|
| 174 | - </span> |
|
| 175 | - html, |
|
| 176 | - $this->is_visible ? 'success' : 'danger', |
|
| 177 | - $this->is_visible ? 'check-circle' : 'times-circle', |
|
| 178 | - $this->is_visible ? trans('Yes') : trans('No') |
|
| 179 | - ); |
|
| 180 | - } |
|
| 181 | -} |
|
@@ -69,13 +69,3 @@ |
||
| 69 | 69 | public function getIsOrderCustomQuantityBadgeAttribute(): string |
| 70 | 70 | { |
| 71 | 71 | return sprintf(<<<'html' |
| 72 | - <span class="badge badge-%s"> |
|
| 73 | - <i class="fa fa-%s"></i> %s |
|
| 74 | - </span> |
|
| 75 | - html, |
|
| 76 | - $this->is_order_custom_quantity ? 'success' : 'danger', |
|
| 77 | - $this->is_order_custom_quantity ? 'check-circle' : 'times-circle', |
|
| 78 | - $this->is_order_custom_quantity ? trans('Yes') : trans('No') |
|
| 79 | - ); |
|
| 80 | - } |
|
| 81 | -} |
|
@@ -44,35 +44,3 @@ |
||
| 44 | 44 | public function getIsActiveBadgeAttribute(): string |
| 45 | 45 | { |
| 46 | 46 | return sprintf(<<<'html' |
| 47 | - <span class="badge badge-%s"> |
|
| 48 | - <i class="fa fa-%s"></i> %s |
|
| 49 | - </span> |
|
| 50 | - html, |
|
| 51 | - $this->is_active ? 'success' : 'danger', |
|
| 52 | - $this->is_active ? 'check-circle' : 'times-circle', |
|
| 53 | - $this->is_active ? trans('Active') : trans('Not Active') |
|
| 54 | - ); |
|
| 55 | - } |
|
| 56 | - |
|
| 57 | - /** |
|
| 58 | - * Return "role" attribute value. |
|
| 59 | - * |
|
| 60 | - * @return string |
|
| 61 | - */ |
|
| 62 | - public function getRoleAttribute(): string |
|
| 63 | - { |
|
| 64 | - $this->load('roles:id,name'); |
|
| 65 | - |
|
| 66 | - return $this->roles->first()->name; |
|
| 67 | - } |
|
| 68 | - |
|
| 69 | - /** |
|
| 70 | - * Return "gravatar_image" attribute value. |
|
| 71 | - * |
|
| 72 | - * @return string |
|
| 73 | - */ |
|
| 74 | - public function getGravatarImageAttribute(): string |
|
| 75 | - { |
|
| 76 | - return gravatar_image($this->email); |
|
| 77 | - } |
|
| 78 | -} |
|