Skip to content

Fetch from multiple hashids #28

@ignacio-dev

Description

@ignacio-dev

Is it possible to get() from an array of hashids?

Or perhaps access the hashidToId() method statically?

At the moment I am having to do:

$ids = [];

foreach ($hashids as $hashid) {
    array_push($ids, (new Product)->hashidToId($hashid));
}

return Product::whereIn('id', $ids)->get();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions