Looking to hire Laravel developers? Try LaraJobs

laravel-api-provider maintained by tokenly

Description
An API service provider for Laravel
Author
Last update
2022/03/09 11:11 (dev-master)
License
Links
Downloads
15 276

Comments
comments powered by Disqus

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,
        ],
    ],
    // ...