You've already forked Epicnabbo-Catalogus-Updated-Daily
🆙 More fixes 🆙
This commit is contained in:
@@ -15,16 +15,25 @@ class WebsiteHelpCenterTicket extends Model
|
|||||||
|
|
||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return BelongsTo<User, $this>
|
||||||
|
*/
|
||||||
public function user(): BelongsTo
|
public function user(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(User::class);
|
return $this->belongsTo(User::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return BelongsTo<WebsiteHelpCenterCategory, $this>
|
||||||
|
*/
|
||||||
public function category(): BelongsTo
|
public function category(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(WebsiteHelpCenterCategory::class);
|
return $this->belongsTo(WebsiteHelpCenterCategory::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return HasMany<WebsiteHelpCenterTicketReply, $this>
|
||||||
|
*/
|
||||||
public function replies(): HasMany
|
public function replies(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(WebsiteHelpCenterTicketReply::class, 'ticket_id');
|
return $this->hasMany(WebsiteHelpCenterTicketReply::class, 'ticket_id');
|
||||||
@@ -50,8 +59,11 @@ class WebsiteHelpCenterTicket extends Model
|
|||||||
return $this->open || hasPermission('manage_website_tickets');
|
return $this->open || hasPermission('manage_website_tickets');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \Illuminate\Database\Eloquent\Casts\Attribute<string, never>
|
||||||
|
*/
|
||||||
protected function content(): \Illuminate\Database\Eloquent\Casts\Attribute
|
protected function content(): \Illuminate\Database\Eloquent\Casts\Attribute
|
||||||
{
|
{
|
||||||
return \Illuminate\Database\Eloquent\Casts\Attribute::make(get: fn($value) => Purify::clean($value));
|
return \Illuminate\Database\Eloquent\Casts\Attribute::make(get: fn ($value) => Purify::clean((string) $value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,8 +27,11 @@ class WebsiteHelpCenterTicketReply extends Model
|
|||||||
return $this->user_id === Auth::id() || hasPermission('delete_website_ticket_replies');
|
return $this->user_id === Auth::id() || hasPermission('delete_website_ticket_replies');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \Illuminate\Database\Eloquent\Casts\Attribute<string, never>
|
||||||
|
*/
|
||||||
protected function content(): \Illuminate\Database\Eloquent\Casts\Attribute
|
protected function content(): \Illuminate\Database\Eloquent\Casts\Attribute
|
||||||
{
|
{
|
||||||
return \Illuminate\Database\Eloquent\Casts\Attribute::make(get: fn($value) => Purify::clean($value));
|
return \Illuminate\Database\Eloquent\Casts\Attribute::make(get: fn ($value) => Purify::clean((string) $value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ class WebsiteRule extends Model
|
|||||||
{
|
{
|
||||||
protected $guarded = [];
|
protected $guarded = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return BelongsTo<WebsiteRuleCategory, $this>
|
||||||
|
*/
|
||||||
public function category(): BelongsTo
|
public function category(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(WebsiteRuleCategory::class, 'category_id');
|
return $this->belongsTo(WebsiteRuleCategory::class, 'category_id');
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ class WebsiteRuleCategory extends Model
|
|||||||
{
|
{
|
||||||
protected $guarded = [];
|
protected $guarded = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return HasMany<WebsiteRule, $this>
|
||||||
|
*/
|
||||||
public function rules(): HasMany
|
public function rules(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(WebsiteRule::class, 'category_id');
|
return $this->hasMany(WebsiteRule::class, 'category_id');
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use App\Models\User\UserItem;
|
use App\Models\Game\Furniture\Item;
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
|
||||||
class ItemDefinition extends Model
|
class ItemDefinition extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
|
||||||
|
|
||||||
protected $table = 'items_base';
|
protected $table = 'items_base';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return HasMany<Item, $this>
|
||||||
|
*/
|
||||||
public function userItems(): HasMany
|
public function userItems(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(UserItem::class, 'item_id');
|
return $this->hasMany(Item::class, 'item_id');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ class CameraWeb extends Model
|
|||||||
*/
|
*/
|
||||||
protected function formattedDate(): Attribute
|
protected function formattedDate(): Attribute
|
||||||
{
|
{
|
||||||
|
/** @var Attribute<string, never> */
|
||||||
return new Attribute(
|
return new Attribute(
|
||||||
get: fn () => \Illuminate\Support\Facades\Date::parse($this->timestamp)->format('Y-m-d H:i'),
|
get: fn () => \Illuminate\Support\Facades\Date::parse($this->timestamp)->format('Y-m-d H:i'),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -119,7 +119,9 @@ class User extends Authenticatable implements FilamentUser, HasName
|
|||||||
default => 0,
|
default => 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
return $this->currencies->where('type', $type)->first()?->amount ?? 0;
|
$currency = $this->currencies->where('type', $type)->first();
|
||||||
|
|
||||||
|
return $currency ? $currency->amount : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user