PHPackages                             i74ifa/gpapi - 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. i74ifa/gpapi

ActiveLibrary[API Development](/categories/api)

i74ifa/gpapi
============

package to solve the problem of increasing unused data in api.

0.2(2y ago)128MITPHP

Since Feb 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/i74ifa/gpapi)[ Packagist](https://packagist.org/packages/i74ifa/gpapi)[ RSS](/packages/i74ifa-gpapi/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Gpapi is Some grapql solutions in Rest api
==========================================

[](#gpapi-is-some-grapql-solutions-in-rest-api)

Solutions
---------

[](#solutions)

- response specific relationships
- response specific response params
- response params from relationships

how is work
-----------

[](#how-is-work)

The work is started in the trait class called Gpapi

We add it to the Resource Class to be supported after that

Let's start a project to show the way

### Relations param form

[](#relations-param-form)

We will stick to this formula

```
gpapi.test/bestApi/api/post/1?relations=tags

```

`relations=tags` We want a relationship **tags**

Define params for a given relationship

```
gpapi.test/bestApi/api/post/1?relations=tags[id, name]

```

Models
------

[](#models)

- App\\Models\\Post
- App\\Models\\Tag

Resources
---------

[](#resources)

```
