public function getByUser(int $id, int $scopes = self::DEFAULT, int $limit = 15): LengthAwarePaginator
    {
        $query = $this->getModel()->newQuery()->where('user_id', $id);

        return $this->getScopes($query, $scopes)->paginate($limit);
    }
public function getByUser(int $id, int $scopes = self::DEFAULT, int $limit = 15): LengthAwarePaginator
    {
        $query = $this->getModel()->newQuery()->where('user_id', $id);

        return $this->getScopes($query, $scopes)->paginate($limit);
    }
public function getByUser ( int $ id , int $ scopes = self :: DEFAULT , int $ limit = 15 ) : LengthAwarePaginator { $ query = $ this -> getModel ( ) -> newQuery ( ) -> where ( 'user_id' , $ id ) ; return $ this -> getScopes ( $ query , $ scopes ) -> paginate ( $ limit ) ; }
Get cages for user

@param int  $id
@param int  $scopes
@param int  $limit
@return \Illuminate\Contracts\Pagination\LengthAwarePaginator
Get cages for user