PHPackages                             zlt/laravel-api-auth - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. zlt/laravel-api-auth

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

zlt/laravel-api-auth
====================

v0.2.9.5(3y ago)0212MITPHP

Since Sep 22Pushed 3y ago1 watchersCompare

[ Source](https://github.com/w99910/laravel-api-auth)[ Packagist](https://packagist.org/packages/zlt/laravel-api-auth)[ Fund](https://www.buymeacoffee.com/zawlintun)[ RSS](/packages/zlt-laravel-api-auth/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (22)Used By (0)

Laravel Api Auth
================

[](#laravel-api-auth)

This package provides basic api authorization and easy-to-use servicing your Models.

- Using this package, you don't need to write your own authorization logic for your api. Even if you don't want to, you can use actions classes to ease your own authorization.
- You don't have to write your own query. Instead of using `Post::whereBetween(...)->orderByDesc(...)->get()`, you can use like ```
    PostService::get([
      'startDate' => '2022-01-01',
      'endDate' => '2022-06-01',
      'orderBy' => 'date',
      'isDesc' => true,
    ])
    ```

Table Of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Publish config file](#publish-config-file)
- [Authorization](#authorization)
    - [Manually Login and Register](#manually-login-and-register)
- [Servicing](#servicing)
    - [Why you would need this?](#why-you-would-need-this)
    - [How to use?](#how-to-use-it)
- [Caching Response](#caching-response)
- [License](#license)
- [Conclusion](#conclusion)

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

[](#installation)

```
$ composer require zlt/laravel-api-auth
```

Publish config file
-------------------

[](#publish-config-file)

```
$ php artisan vendor:publish --provider="Zlt\LaravelApiAuth\LaravelApiAuthServiceProvider"
```

The following are the default config.

```
