Compare commits

...

3 Commits

@ -431,7 +431,7 @@ function showCatNested($cats, $parent = null)
$ret = "";
foreach ($cats as $cat) {
if ($cat->parent_id == $parent & !$cat->hide) {
$ret .= "<li>";
$ret .= "<li class='category-nested-{$cat->id}'>";
$ret .= "<a href='" . $cat->webUrl() . "'>";
$ret .= $cat->name . '</a>';
$ret .= showCatNested($cats, $cat->id);
@ -1513,3 +1513,17 @@ function getCategoriesSet($key,$limit=4,$orderBy = 'sort', $asc = 'ASC')
{
return \App\Models\Category::whereIn('id',json_decode(getSetting($key) ?? []))->where('hide',0)->limit($limit)->orderBy($orderBy,$asc)->get();
}
/**
* get website main categories
* @param $key
* @param $limit
* @param $orderBy
* @param $asc
* @return Group[]|\LaravelIdea\Helper\App\Models\_IH_Group_C
*/
function getGroupsSet($key,$limit=4,$orderBy = 'sort', $asc = 'ASC')
{
return \App\Models\Group::whereIn('id',json_decode(getSetting($key) ?? []))->where('hide',0)->limit($limit)->orderBy($orderBy,$asc)->get();
}

@ -39,6 +39,7 @@ class Visitor extends Model
'UC Browser' => '(UCBrowser)',
'Yandex Browser' => '(YaBrowser)',
'Samsung Internet' => '(SamsungBrowser)',
'other' => 'other'
];
public static $osList = [

Loading…
Cancel
Save