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,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Help;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class WebsiteHelpCenterCategory extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
|
||||
public $timestamps = false;
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Help;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Stevebauman\Purify\Facades\Purify;
|
||||
|
||||
class WebsiteHelpCenterTicket extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function category(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(WebsiteHelpCenterCategory::class);
|
||||
}
|
||||
|
||||
public function replies(): HasMany
|
||||
{
|
||||
return $this->hasMany(WebsiteHelpCenterTicketReply::class, 'ticket_id');
|
||||
}
|
||||
|
||||
public function canDeleteTicket()
|
||||
{
|
||||
return $this->user_id === Auth::id() || hasPermission('delete_website_tickets');
|
||||
}
|
||||
|
||||
public function canManageTicket()
|
||||
{
|
||||
return $this->user_id === Auth::id() || hasPermission('manage_website_tickets');
|
||||
}
|
||||
|
||||
public function canCloseTicket()
|
||||
{
|
||||
return $this->user_id === Auth::id() || hasPermission('manage_website_tickets');
|
||||
}
|
||||
|
||||
public function isOpen()
|
||||
{
|
||||
return $this->open || hasPermission('manage_website_tickets');
|
||||
}
|
||||
|
||||
protected function content(): \Illuminate\Database\Eloquent\Casts\Attribute
|
||||
{
|
||||
return \Illuminate\Database\Eloquent\Casts\Attribute::make(get: fn($value) => Purify::clean($value));
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Help;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class WebsiteHelpCenterTicketCategories extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Help;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Stevebauman\Purify\Facades\Purify;
|
||||
|
||||
class WebsiteHelpCenterTicketReply extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
|
||||
public function ticket(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(WebsiteHelpCenterTicket::class, 'ticket_id');
|
||||
}
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'user_id');
|
||||
}
|
||||
|
||||
public function canDeleteReply()
|
||||
{
|
||||
return $this->user_id === Auth::id() || hasPermission('delete_website_ticket_replies');
|
||||
}
|
||||
|
||||
protected function content(): \Illuminate\Database\Eloquent\Casts\Attribute
|
||||
{
|
||||
return \Illuminate\Database\Eloquent\Casts\Attribute::make(get: fn($value) => Purify::clean($value));
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Help;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class WebsiteHelpCenterTicketStatus extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Help;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class WebsiteRule extends Model
|
||||
{
|
||||
protected $guarded = [];
|
||||
|
||||
public function category(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(WebsiteRuleCategory::class, 'category_id');
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Help;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class WebsiteRuleCategory extends Model
|
||||
{
|
||||
protected $guarded = [];
|
||||
|
||||
public function rules(): HasMany
|
||||
{
|
||||
return $this->hasMany(WebsiteRule::class, 'category_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user