mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
deactivate bookcases
This commit is contained in:
@@ -41,7 +41,6 @@ class BookCase extends Model implements HasMedia
|
||||
|
||||
protected static function booted()
|
||||
{
|
||||
static::addGlobalScope(new ActiveBookCases);
|
||||
static::creating(function ($model) {
|
||||
if (!$model->created_by) {
|
||||
$model->created_by = auth()->id();
|
||||
@@ -49,6 +48,11 @@ class BookCase extends Model implements HasMedia
|
||||
});
|
||||
}
|
||||
|
||||
public function scopeActive($query)
|
||||
{
|
||||
return $query->where('deactivated', false);
|
||||
}
|
||||
|
||||
public function registerMediaConversions(Media $media = null): void
|
||||
{
|
||||
$this
|
||||
|
||||
Reference in New Issue
Block a user