marcreichel/igdb-laravel

Still unable to install on Laravel 5.8 with a fresh install

lofonic opened this issue · 8 comments

Marc, I'm sorry my contribution didn't resolve the issue. I'm realizing I was testing my fork but it wasn't specifying a version number so part of the pulling process was deferring to your package during my testing. Essentially my commit is saying "no greater than 5.8" since we're on something like 5.8.3 it won't install

I think the issue is worth discussing and trying to understand further (at least for me since as I read more into it and understand composer syntax it appears having the req is it is might not be correct)

As I'm understanding the composer.json spec it appears that the laravel requirement might be better suited under require-dev. Regardless the proper way to do a 5.7 - 5.8 requirement syntactically is:

"laravel/framework": "5.7.*||5.8.*",

https://getcomposer.org/doc/articles/versions.md

Another possibility is to just do a tilde with 5.7 which would allow any release of laravel till 6

"laravel/framework": "~5.7",

Before I submit another pull request let me know if these work for you. Sorry again for making the mistake in the first place.

Hey there.

Im currently doing a IT bootcamp and for my study I need to fill my database with game information.
The project is in laravel, so this would seem like a perfect solution for me.

I do however get a strange error. I guess its telling me to downgrade?
Problem 1


- Installation request for marcreichel/igdb-laravel ^0.5.0 -> satisfiable by marcreichel/igdb-laravel[v0.5.0].
- Conclusion: remove laravel/framework v5.8.4
- Conclusion: don't install laravel/framework v5.8.4
- marcreichel/igdb-laravel v0.5.0 requires laravel/framework >=5.7 <=5.8 -> satisfiable by laravel/framework[5.7.x-dev, v5.8.0].
- Can only install one of: laravel/framework[5.7.x-dev, v5.8.4].
- Can only install one of: laravel/framework[v5.8.0, v5.8.4].
- Installation request for laravel/framework (locked at v5.8.4, required as 5.8.*) -> satisfiable by laravel/framework[v5.8.4].

Could you please advise on how to proceed.

Any help is appreciated very much.

Rick Buter

I will look into this today

cheers mate. much obliged

So. I published version 0.6.0 now. This should hopefully be installable for Laravel 5.8 environments. Thanks to @lofonic :)
Will try to install it in a fresh Laravel 5.8 project myself later.

that actually did the trick. kudos for the fast response mate! cheers

So, I don't mean to bother you with every question. But I am trying to sort by genre.
In your list it says "Genre" and on the IGDB site is says "genres".

I tried both but no luck.
Thinking it has to be some kind of this:
$games = Game::where('Genre', 'action')->get();

But then I noticed that there are multiple genres and you also have category which are based on 0, 1, 2 etc etc.
But is there a way to see what number a category or genre is?

As you can probably tell I'm learning and I don't intent to bother you more after this. Thanks in advance.

Rick, you'll want to use orderBy() to sort and remember your doing all of these on the fields from the API. So in this case it would be something like Game::orderBy('genres', 'desc')->get();

Most likely you'll also want to apply some kind of limit in order to paginate the results.

again thanks a lot for the help. Going to work on it now!