From afc06107651071592e3d7ad85709f39fc40e7ef7 Mon Sep 17 00:00:00 2001 From: k-ek Date: Sat, 7 Jun 2025 13:03:32 +0100 Subject: [PATCH] -fix Class 'App\Manipulations' not found -fix duplicate SESSION_DOMAIN in .env.example --- .env.example | 1 - app/Models/User.php | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.env.example b/.env.example index 8b6ba20..d92584e 100644 --- a/.env.example +++ b/.env.example @@ -65,4 +65,3 @@ VITE_APP_NAME="${APP_NAME}" # Customizations SANCTUM_STATEFUL_DOMAINS=yourdomain.test -SESSION_DOMAIN=yourdomain.test diff --git a/app/Models/User.php b/app/Models/User.php index 6cc437c..a0b7556 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -10,7 +10,7 @@ use Illuminate\Notifications\Notifiable; use Laravel\Sanctum\HasApiTokens; use Silber\Bouncer\Database\HasRolesAndAbilities; -use Spatie\Image\Manipulations; +use Spatie\Image\Enums\Fit; use Spatie\MediaLibrary\HasMedia; use Spatie\MediaLibrary\InteractsWithMedia; use Spatie\MediaLibrary\MediaCollections\Models\Media; @@ -154,13 +154,13 @@ public function getIsAdminAttribute() public function registerMediaConversions(?Media $media = null): void { $this->addMediaConversion('small_thumb') - ->fit(Manipulations::FIT_CROP, 300, 300) + ->fit(Fit::Fill, 300, 300) ->nonQueued(); $this->addMediaConversion('medium_thumb') - ->fit(Manipulations::FIT_CROP, 600, 600) + ->fit(Fit::Fill, 600, 600) ->nonQueued(); $this->addMediaConversion('large_thumb') - ->fit(Manipulations::FIT_CROP, 1200, 1200) + ->fit(Fit::Fill, 1200, 1200) ->nonQueued(); } }