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

ActiveLibrary

dandaj/api
==========

Small api package with authorization and token system

0159PHP

Since Feb 27Pushed 9y ago1 watchersCompare

[ Source](https://github.com/omenomn/api)[ Packagist](https://packagist.org/packages/dandaj/api)[ RSS](/packages/dandaj-api/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Welcome to dandaj/api!
======================

[](#welcome-to-dandajapi)

Small Api package with authorization and token system.

---

Documents
---------

[](#documents)

- Add to composer.json if not exists:

```
"minimum-stability": "dev",
"prefer-stable" : true

```

- composer require dandaj/api
- config/app.php add to providers:

```
Dandaj\Api\ApiServiceProvider::class,

```

- php artisan vendor:publish
- composer dumpautoload
- Add to database/seeds/DatabaseSeeder.php to "run" function:

```
$this->call('OAuthUsersTableSeeder');

```

- php artisan migrate
- php artisan db:seed
- Transformers example of use.
    - Create UserTransformer class in the previously created folder Transformers or other name in the app folder and create public function transform with model param. Transformers serve to return selected fields of model in response:

```
