You've already forked Epicnabbo-Catalogus-Updated-Daily
🆙 Final fix delete storage link to fix news_images and logs 🆙
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Shop;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class WebsitePaypalTransaction extends Model
|
||||
{
|
||||
protected $guarded = ['id', 'created_at', 'updated_at'];
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Shop;
|
||||
|
||||
use App\Models\Game\Furniture\ItemBase;
|
||||
use App\Models\Game\Permission;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
class WebsiteShopArticle extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
|
||||
public function furniItems(): Collection
|
||||
{
|
||||
if (! $this->furniture) {
|
||||
return collect();
|
||||
}
|
||||
|
||||
$furniture = json_decode($this->furniture, true);
|
||||
$furnitureIds = array_column($furniture, 'item_id');
|
||||
|
||||
return ItemBase::whereIn('id', $furnitureIds)->get();
|
||||
}
|
||||
|
||||
public function rank(): HasOne
|
||||
{
|
||||
return $this->hasOne(Permission::class, 'id', 'give_rank');
|
||||
}
|
||||
|
||||
public function features(): HasMany
|
||||
{
|
||||
return $this->HasMany(WebsiteShopArticleFeature::class, 'article_id', 'id');
|
||||
}
|
||||
|
||||
public function price(): float|int
|
||||
{
|
||||
if ($this->costs < 100) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return $this->costs / 100;
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Shop;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class WebsiteShopArticleFeature extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
|
||||
public function article(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(WebsiteShopArticle::class, 'article_id', 'id');
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Shop;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class WebsiteShopCategory extends Model
|
||||
{
|
||||
protected $guarded = [];
|
||||
|
||||
public function articles(): HasMany
|
||||
{
|
||||
return $this->hasMany(WebsiteShopArticle::class);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Shop;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class WebsiteShopVoucher extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'expires_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Shop;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class WebsiteUsedShopVoucher extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
|
||||
public function used(): HasMany
|
||||
{
|
||||
return $this->hasMany(WebsiteUsedShopVoucher::class, 'voucher_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user