PHPackages                             napp/apicore - 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. napp/apicore

ActiveLibrary[API Development](/categories/api)

napp/apicore
============

API core for projects

2.0.0(5y ago)26.5k22MITPHPPHP ^7.2|^8.0CI failing

Since Nov 14Pushed 5y ago4 watchersCompare

[ Source](https://github.com/Napp/apicore)[ Packagist](https://packagist.org/packages/napp/apicore)[ RSS](/packages/napp-apicore/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (16)Versions (36)Used By (2)

Napp API Core
=============

[](#napp-api-core)

[![Build Status](https://camo.githubusercontent.com/bced4c135aff85d4576d11ff0fe8abd24b4b54a148c79e3cb8ec5e05f0b55740/68747470733a2f2f7472617669732d63692e6f72672f4e6170702f617069636f72652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Napp/apicore)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/8ee55c92e7c69cd5869561daf456372496c1cd9c4828212f5472dfe6a32da9c8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4e6170702f617069636f72652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Napp/apicore/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/7664c8448d448a56f7198cc48980d09b969ccec2afc296f98b35af2b6c58246c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4e6170702f617069636f72652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Napp/apicore/?branch=master)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Use as a foundation for APIs.

Features
--------

[](#features)

- Full request cycle
    - APU auth guard
    - Transform request input based on model api mapping
    - Validate transformed data
    - Transform response output (with support for nested relationships using `TransformAware`)
    - Correct HTTP responses backed into ApiController
- Exception handling with two renderers (dev and prod)
- Standard Exceptions
- ETag middleware for cache responses (Not Modified 304)
- Internal Router for internal api requests
- API Proxy to use easy request handling

Usage
-----

[](#usage)

### Transform Mapping

[](#transform-mapping)

Being able to hide database fields from the outside exposed API. With auto type casting.

```
