mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 02:01:33 +00:00
Update Category class
This commit is contained in:
@@ -442,12 +442,13 @@ class Category extends Model
|
||||
* Return the parent and category name from the supplied categoryID.
|
||||
*
|
||||
*
|
||||
* @param $ID
|
||||
* @param $categoryId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getNameByID($ID): string
|
||||
public static function getNameByID($categoryId): string
|
||||
{
|
||||
$cat = self::query()->where('id', $ID)->first();
|
||||
$cat = self::query()->where('id', $categoryId)->first();
|
||||
|
||||
return $cat !== null ? $cat->parent->title.' -> '.$cat->title : '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user