'boolean']; public function sites() { return $this->hasMany(BookmarkSite::class, 'category'); } public static function create(Request $request): BookmarkCategory { $newCategory = new BookmarkCategory(); $newCategory->name = $request->get('name'); $newCategory->shuffled = $request->has('shuffled'); $newCategory->save(); return $newCategory; } public static function insertBookmarkCategory(string $name): void { $newBookmarkCategory = new BookmarkCategory; $newBookmarkCategory->name = $name; $newBookmarkCategory->save(); } public static function selectBookmarks(int $id) { $bookmarks = BookmarkSite::where('category', '=', $id)->firstOrFail(); return $bookmarks; } }