Add toggle for homepage

This commit is contained in:
Ludovic CANDELLIER
2022-03-24 10:08:23 +01:00
parent c65056531c
commit c357ea932a
6 changed files with 33 additions and 7 deletions

View File

@@ -148,6 +148,11 @@ class Categories
return self::update(['visible' => $visible], $id);
}
public static function toggleHomepage($id, $homepage)
{
return self::update(['homepage' => $homepage], $id);
}
public static function getRoot()
{
return app('rinvex.categories.category')->find(1);