RepositoryServiceProvider.php 751 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /*
  3. * This file is part of the Jiannei/lumen-api-starter.
  4. *
  5. * (c) Jiannei <longjian.huang@foxmail.com>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace App\Providers;
  11. use Prettus\Repository\Providers\LumenRepositoryServiceProvider;
  12. class RepositoryServiceProvider extends LumenRepositoryServiceProvider
  13. {
  14. /**
  15. * Bootstrap services.
  16. */
  17. public function boot()
  18. {
  19. $this->app->bind(\App\Contracts\Repositories\UserRepository::class, \App\Repositories\Eloquent\UserRepositoryEloquent::class);
  20. $this->app->bind(\App\Contracts\Repositories\PostRepository::class, \App\Repositories\Eloquent\PostRepositoryEloquent::class);
  21. }
  22. }