PHPackages                             dherran/laravel-rawg - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. dherran/laravel-rawg

ActiveLibrary[API Development](/categories/api)

dherran/laravel-rawg
====================

Collection of RAWG API methods for Laravel

1.0.2(5y ago)16922MITPHP

Since Nov 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/dherran/laravel-rawg)[ Packagist](https://packagist.org/packages/dherran/laravel-rawg)[ Docs](https://dherran.github.io/laravel-rawg/)[ RSS](/packages/dherran-laravel-rawg/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

Collection of RAWG API Web Services for Laravel 6-8
---------------------------------------------------

[](#collection-of-rawg-api-web-services-for-laravel-6-8)

Provides a convenient way of setting up and making requests to the RAWG API from a [Laravel](http://laravel.com/) application. For RAWG endpoint documentation, rate limits and licencing please visit the [RAWG API Docs](https://api.rawg.io/docs).

Dependency
----------

[](#dependency)

- [PHP cURL](http://php.net/manual/en/curl.installation.php)
- [PHP 7](http://php.net/)

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require dherran/laravel-rawg
```

Configuration
-------------

[](#configuration)

Publish the configuration file using **`php artisan vendor:publish --provider="Rawg\RawgServiceProvider"`** or simply copy the package configuration file and paste it into **`config/rawg.php`**

Open the config file **`config/rawg.php`** and add your app API Key obtainable at .

```
    /*
    |----------------------------------
    | API Key
    |------------------------------------
    */

    'api_key' => 'XYZ',
```

As per the RAWG API Docs: Every API request should have an API Key. If you don’t provide it, we may ban your requests.

Usage
-----

[](#usage)

Here is an example of making request to Games endpoint:

```
$response = \Rawg::load('games')->setParams([
                'page' => 1,
                'page_size' => 40,
                'ordering' => '-rating',
            ])->get();
```

Or finding details for a specific game:

```
$response = \Rawg::load('games/{id}')->setParams([
                'id' => 86,
            ])->get();
```

The principle is that the load method takes the endpoint as provided by RAWG.

Available methods
-----------------

[](#available-methods)

- [`load( $endpoint )`](#load)
- [`setParamByKey($key, $value)`](#setParamByKey)
- [`setParams($parameters)`](#setParams)
- [`get()`](#get)
- [`get($key)`](#get)

---

**`load( $serviceName )`** - prepare the endpoint name

Accepts string as parameter. You can find all endpoints in the RAWG API Docs. Returns a reference to itself.

```
\Rawg::load('publishers')
...
```

---

**`setParamByKey( $key, $value )`** - set the request parameter using key:value pair

Accepts two parameters:

- `key` - body parameter name
- `value` - body parameter value

Deeply nested arrays can use 'dot' notation to assign values.
Returns a reference to itself.

```
$endpoint = \Rawg::load('publishers')
   ->setParamByKey('page', 3)
   ->setParamByKey('page_size', 10)
    ...
```

---

**`setParams( $parameters)`** - set all request parameters at once

Accepts and array of parameters
Returns a reference to itself.

```
$response = \Rawg::load('games')
                ->setParam([
                   'search' => 'monster',
                   'tags' => 'multiplayer',
                ])
...
```

---

- **`get()`** - performs a RESTful request via GET
- **`get($key)`** - filter downs the request result. Dot notation is supported here

```
$response = \Rawg::load('games')
                ->setParamByKey('search', 'monster')
                 ->get();
```

Example with `$key` parameter

```
$response = \Rawg::load('games')
                ->setParamByKey('search', 'monster')
                 ->get('results');
```

Support
-------

[](#support)

[Please open an issue on GitHub](https://github.com/dherran/laravel-rawg/issues)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~242 days

Total

3

Last Release

1874d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/284658beca2b1b19d0567fc81b9d4c01cfcb1953e774ae9b769eaa4482c4cf52?d=identicon)[dherran](/maintainers/dherran)

---

Top Contributors

[![dherran](https://avatars.githubusercontent.com/u/134963?v=4)](https://github.com/dherran "dherran (4 commits)")

---

Tags

rawgrawg for laravelrawg for php

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dherran-laravel-rawg/health.svg)

```
[![Health](https://phpackages.com/badges/dherran-laravel-rawg/health.svg)](https://phpackages.com/packages/dherran-laravel-rawg)
```

###  Alternatives

[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

683.2M9](/packages/mll-lab-laravel-graphiql)[spatie/laravel-route-discovery

Auto register routes using PHP attributes

23645.0k2](/packages/spatie-laravel-route-discovery)[esign/laravel-conversions-api

A laravel wrapper package around the Facebook Conversions API

69145.4k](/packages/esign-laravel-conversions-api)[didww/didww-api-3-php-sdk

PHP SDK for DIDWW API 3

1218.2k](/packages/didww-didww-api-3-php-sdk)[surface/laravel-webfinger

A Laravel package to create an ActivityPub webfinger.

113.8k](/packages/surface-laravel-webfinger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
