|
|
|
@ -4,6 +4,7 @@ namespace App\Models; |
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model; |
|
|
|
use Laravel\Scout\Searchable; |
|
|
|
use Illuminate\Support\Str; |
|
|
|
|
|
|
|
class LanzuGoods extends Model |
|
|
|
{ |
|
|
|
@ -12,6 +13,13 @@ class LanzuGoods extends Model |
|
|
|
protected $table = 'lanzu_goods'; |
|
|
|
protected $dateFormat = 'U'; |
|
|
|
|
|
|
|
public function getCoverImgAttribute($v){ |
|
|
|
if(Str::startsWith($v,"http")){ |
|
|
|
return $v; |
|
|
|
}else{ |
|
|
|
return env('IMG_HOST') . $v; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public function searchableAs() |
|
|
|
{ |
|
|
|
|