public function getByAttributes(array $attributes, int $scopes = self::DEFAULT, int $limit = 15) : LengthAwarePaginator
    {
        if (empty($attributes)) {
            return null;
        }

        $query = $this->getModel()->newQuery();

        foreach ($attributes as $key => $value) {
            $query->where($key, $value);
        }

        return $this->getScopes($query, $scopes)->paginate($limit);
    }
public function getByAttributes(array $attributes, int $scopes = self::DEFAULT, int $limit = 15) : LengthAwarePaginator
    {
        if (empty($attributes)) {
            return null;
        }

        $query = $this->getModel()->newQuery();

        foreach ($attributes as $key => $value) {
            $query->where($key, $value);
        }

        return $this->getScopes($query, $scopes)->paginate($limit);
    }
public function getByAttributes ( array $ attributes , int $ scopes = self :: DEFAULT , int $ limit = 15 ) : LengthAwarePaginator { if ( empty ( $ attributes ) ) { return null ; } $ query = $ this -> getModel ( ) -> newQuery ( ) ; foreach ( $ attributes as $ key => $ value ) { $ query -> where ( $ key , $ value ) ; } return $ this -> getScopes ( $ query , $ scopes ) -> paginate ( $ limit ) ; }
Get cages by attributes

@param array $attributes
@param int   $scopes
@param int   $limit
@return \Illuminate\Contracts\Pagination\LengthAwarePaginator
Get cages by attributes