AppServiceProvider.php 655 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Providers;
  3. use Illuminate\Support\ServiceProvider;
  4. use Illuminate\Support\Facades\Schema;
  5. class AppServiceProvider extends ServiceProvider
  6. {
  7. /**
  8. * Bootstrap any application services.
  9. *
  10. * @return void
  11. */
  12. public function boot()
  13. {
  14. //驱动
  15. app('Dingo\Api\Auth\Auth')->extend('jwt', function ($app) {
  16. return new \Dingo\Api\Auth\Provider\JWT($app['Tymon\JWTAuth\JWTAuth']);
  17. });
  18. Schema::defaultStringLength(191);
  19. }
  20. /**
  21. * Register any application services.
  22. *
  23. * @return void
  24. */
  25. public function register()
  26. {
  27. //
  28. }
  29. }