mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 04:36:51 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			742 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			742 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Providers\Extensions;
 | |
| 
 | |
| use App\Extensions\Avatar\AvatarService;
 | |
| use App\Extensions\Avatar\Schemas\GravatarSchema;
 | |
| use App\Extensions\Avatar\Schemas\UiAvatarsSchema;
 | |
| use Illuminate\Support\ServiceProvider;
 | |
| 
 | |
| class AvatarServiceProvider extends ServiceProvider
 | |
| {
 | |
|     public function register(): void
 | |
|     {
 | |
|         $this->app->singleton(AvatarService::class, function ($app) {
 | |
|             $service = new AvatarService(config('panel.filament.uploadable-avatars', false), config('panel.filament.avatar-provider', 'gravatar'));
 | |
| 
 | |
|             // Default Avatar providers
 | |
|             $service->register(new GravatarSchema());
 | |
|             $service->register(new UiAvatarsSchema());
 | |
| 
 | |
|             return $service;
 | |
|         });
 | |
|     }
 | |
| }
 | 
