PHPackages                             koiiiey/api - 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. koiiiey/api

ActiveLibrary[API Development](/categories/api)

koiiiey/api
===========

Laravel REST API

0126PHP

Since Nov 30Pushed 5y ago3 watchersCompare

[ Source](https://github.com/KoIIIeY/api)[ Packagist](https://packagist.org/packages/koiiiey/api)[ RSS](/packages/koiiiey-api/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

API doc
=======

[](#api-doc)

**Auth token header** Authorization: Bearer {api\_token}

Auth api
========

[](#auth-api)

Login
-----

[](#login)

- method post
- url /api/v1/auth/login
- params email, password
- return {api\_token: 'Your api token'}

Register
--------

[](#register)

- method post
- url /api/v1/auth/register
- params email, name, password, password\_confirmation
- return {api\_token: 'Your api token'}

Social
------

[](#social)

- method post
- url /api/v1/auth/social/{social\_provider\_name}
- params client\_id, code
- return {api\_token: 'Your api token'}

Get current user
----------------

[](#get-current-user)

- method get
- url /api/v1/auth/current
- params *with*
- return {user json}

Entities api
============

[](#entities-api)

Get entities paginator
----------------------

[](#get-entities-paginator)

- method get
- url /api/v1/{entity\_class\_basename}
- params *filter*, *with*, *scope*, *per\_page*, *page*
- return {total: 1,per\_page: 30,current\_page: 1,last\_page: 1,next\_page\_url: null,prev\_page\_url: null,from: 1,to: 1,data: \[\]}

Create entity
-------------

[](#create-entity)

- method post
- url /api/v1/{entity\_class\_basename}
- params entity\_attributes
- return {created entity json}

==

example: {a: 1, b: 2, c: {v: 5, n:6}} &lt;-- here C is related in model

Get one entity
--------------

[](#get-one-entity)

- method get
- url /api/v1/{entity\_class\_basename}/{id}
- params *with*
- return {entity json}

Update entity
-------------

[](#update-entity)

- method put
- url /api/v1/{entity\_class\_basename}/{id}
- params entity\_attributes
- return {updated entity json}

Destroy entity
--------------

[](#destroy-entity)

- method delete
- url /api/v1/{entity\_class\_basename}/{id}
- return empty json object {}

Relations api
=============

[](#relations-api)

Get entity relation
-------------------

[](#get-entity-relation)

- method get
- url /api/v1/{parent\_class\_basename}/{id}/{relation\_name}
- params *filter*, *with*, *scope*
- return {relation json} object for has one relation and array for has many

Create related entity
---------------------

[](#create-related-entity)

- method post
- url /api/v1/{parent\_class\_basename}/{id}/{relation\_name}
- params entity\_attributes
- return {created entity json}

Get one related entity
----------------------

[](#get-one-related-entity)

- method get
- url /api/v1/{parent\_class\_basename}/{id}/{relation\_name}/{id}
- params *with*
- return {entity json}

Update related entity
---------------------

[](#update-related-entity)

- method put
- url /api/v1/{parent\_class\_basename}/{id}/{relation\_name}/{id}
- params entity\_attributes
- return {updated entity json}

Destroy related entity
----------------------

[](#destroy-related-entity)

- method delete
- url /api/v1/{parent\_class\_basename}/{id}/{relation\_name}/{id}
- return empty json object {}

============================

Static methods call
-------------------

[](#static-methods-call)

Example: /api/v1/{entity\_class\_basename}/call/{method\_name}/{params}

\*\* INSTALLATION \*\*
----------------------

[](#-installation-)

1. composer require koiiiey/api
2. in config/app.php
    1. providers =&gt; \[ Koiiiey\\Api\\ApiServiceProvider::class, \]
3. Call php artisan vendor:publish --tag=guestFile it will copy Guest.php model to /app/ directory. \\App\\Guest is class that uses for not-authorized users.
4. Configure your auth by \[\]

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 95.5% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f5c07013d754c94249337c3fddd526f0018f2a5025635c962387c1360257814?d=identicon)[KoIIIeY](/maintainers/KoIIIeY)

---

Top Contributors

[![KoIIIeY](https://avatars.githubusercontent.com/u/1047297?v=4)](https://github.com/KoIIIeY "KoIIIeY (21 commits)")[![DarkanSoince](https://avatars.githubusercontent.com/u/20380485?v=4)](https://github.com/DarkanSoince "DarkanSoince (1 commits)")

### Embed Badge

![Health badge](/badges/koiiiey-api/health.svg)

```
[![Health](https://phpackages.com/badges/koiiiey-api/health.svg)](https://phpackages.com/packages/koiiiey-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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