From 0b62f8a1c86f0dab7746af45222cb09aacbc4d9c Mon Sep 17 00:00:00 2001 From: KodeStar Date: Sun, 18 Feb 2018 17:04:18 +0000 Subject: [PATCH] change icon for tags --- app/Item.php | 9 +++++++++ resources/views/item.blade.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/Item.php b/app/Item.php index 853dbbd8..60073961 100644 --- a/app/Item.php +++ b/app/Item.php @@ -153,6 +153,15 @@ class Item extends Model } } + public function getLinkIconAttribute() + { + if((int)$this->type === 1) { + return 'fa-tag'; + } else { + return 'fa-arrow-alt-to-right'; + } + } + public function scopeOfType($query, $type) { switch($type) { diff --git a/resources/views/item.blade.php b/resources/views/item.blade.php index ff65d5b8..9791041e 100644 --- a/resources/views/item.blade.php +++ b/resources/views/item.blade.php @@ -11,7 +11,7 @@
@endif - target }} href="{{ $app->link }}"> + target }} href="{{ $app->link }}">