Skip to content

Call to undefined method MahdiMajidzadeh\LaravelUnsplash\Search::execute() #7

Open
@bickle66

Description

@bickle66

From a previously working project, I am now getting the following error:

  at vendor/mahdimajidzadeh/laravel-unsplash/src/Search.php:10
      6▕ {
      7▕     public function photo($query, $params = [])
      8▕     {
      9▕         $params['query'] = $query;
  ➜  10▕         $this->execute('search/photos', $params);
     11▕         return $this;
     12▕     }
     13▕ 
     14▕     public function collection($query, $params = [])

when calling

MahdiMajidzadeh\LaravelUnsplash\Search::photo("congressional oversight", ["landscape", "congressional oversight"])

I see that Search has no "execute" method like the Unsplush class does.

I was able to get it to work by making that method public, and extending Unsplush in the Search class.

I am not sure if this is the correct solution.

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