diff --git a/composer.json b/composer.json index 13e3322..6f0e1a6 100644 --- a/composer.json +++ b/composer.json @@ -25,14 +25,14 @@ "require": { "php": "^8.0", "illuminate/support": "^8.24", - "imliam/laravel-blade-helper": "^1.0", - "intervention/image": "^2.7" + "imliam/laravel-blade-helper": "^1.0" }, "require-dev": { "orchestra/testbench": "^6.9", "nunomaduro/larastan": "^0.6.10", "pestphp/pest": "^1.2", - "pestphp/pest-plugin-laravel": "^1.0" + "pestphp/pest-plugin-laravel": "^1.0", + "intervention/image": "^2.7" }, "extra": { "laravel": { diff --git a/src/SEOManager.php b/src/SEOManager.php index c45e866..6af7578 100644 --- a/src/SEOManager.php +++ b/src/SEOManager.php @@ -181,6 +181,10 @@ class SEOManager /** Enable favicon extension. */ public function favicon(string $path): static { + if (! class_exists(ImageManager::class)) { + throw new Exception('Intervention not available, please run `composer require intervention/image`'); + } + $this->extensions['favicon'] = true; $doesntHaveFavicon = ! file_exists(public_path('favicon.ico'));