Skip to content

Commit

Permalink
add limit to sub cat
Browse files Browse the repository at this point in the history
  • Loading branch information
A1Gard committed Dec 10, 2023
1 parent 8bf42c9 commit c17c35e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Helpers/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,9 @@ function getProductByCatQ($id, $order = 'id', $limit = 10)
* @param $id
* @return Cat[]|\Illuminate\Database\Eloquent\Builder[]|\Illuminate\Database\Eloquent\Collection|\LaravelIdea\Helper\App\Models\_IH_Cat_C
*/
function getSubCats($id)
function getSubCats($id,$limit = 99)
{
return Cat::where('parent_id', $id)->get();
return Cat::where('parent_id', $id)->limit($limit)->get();
}

/***
Expand Down

0 comments on commit c17c35e

Please sign in to comment.