tokenly / laravel-api-provider by dweller

An API service provider for Laravel
14,995
6
4
Package Data
Maintainer Username: dweller
Maintainer Contact: devon@tokenly.com (Devon Weller)
Package Create Date: 2015-02-13
Package Last Update: 2022-03-09
Language: PHP
License: AGPL-3.0-only
Last Refreshed: 2024-04-25 15:03:59
Package Statistics
Total Downloads: 14,995
Monthly Downloads: 27
Daily Downloads: 0
Total Stars: 6
Total Watchers: 4
Total Forks: 1
Total Open Issues: 0

An API service provider for Laravel. Used by various Tokenly services.

Installation

  • composer require tokenly/laravel-api-provider
  • Create config/api.php and add a file with settings like the ones below
<?php

return [

    'userRepositoryClass' => 'App\Repositories\UserRepository',
    'userClass'           => 'App\Models\User',

];
  • Update config/auth.php and modify the user class
    // ...
    'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => App\Models\User::class,
        ],
    ],
    // ...