Sorting: Connected up default sort setting for books

This commit is contained in:
Dan Brown
2025-02-05 14:33:46 +00:00
parent b897af2ed0
commit 7093daa49d
7 changed files with 77 additions and 14 deletions

View File

@@ -3,8 +3,10 @@
namespace BookStack\Sorting;
use BookStack\Activity\Models\Loggable;
use BookStack\Entities\Models\Book;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* @property int $id
@@ -41,4 +43,9 @@ class SortSet extends Model implements Loggable
{
return url("/settings/sorting/sets/{$this->id}");
}
public function books(): HasMany
{
return $this->hasMany(Book::class);
}
}