You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
480 B

2 years ago
  1. <?php
  2. namespace App\Providers;
  3. use Illuminate\Support\ServiceProvider;
  4. use Illuminate\Support\Str;
  5. class UuidServiceProvider extends ServiceProvider
  6. {
  7. /**
  8. * Register services.
  9. *
  10. * @return void
  11. */
  12. public function register()
  13. {
  14. //
  15. }
  16. /**
  17. * Bootstrap services.
  18. *
  19. * @return void
  20. */
  21. public function boot()
  22. {
  23. $this->app->bind('uuid', function () {
  24. return Str::uuid();
  25. });
  26. }
  27. }