JetstreamServiceProvider.php 932 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace App\Providers;
  3. use App\Actions\Jetstream\DeleteUser;
  4. use Illuminate\Support\ServiceProvider;
  5. use Laravel\Jetstream\Jetstream;
  6. class JetstreamServiceProvider extends ServiceProvider
  7. {
  8. /**
  9. * Register any application services.
  10. *
  11. * @return void
  12. */
  13. public function register()
  14. {
  15. //
  16. }
  17. /**
  18. * Bootstrap any application services.
  19. *
  20. * @return void
  21. */
  22. public function boot()
  23. {
  24. $this->configurePermissions();
  25. Jetstream::deleteUsersUsing(DeleteUser::class);
  26. }
  27. /**
  28. * Configure the permissions that are available within the application.
  29. *
  30. * @return void
  31. */
  32. protected function configurePermissions()
  33. {
  34. Jetstream::defaultApiTokenPermissions(['read']);
  35. Jetstream::permissions([
  36. 'create',
  37. 'read',
  38. 'update',
  39. 'delete',
  40. ]);
  41. }
  42. }