diff --git a/src/Seo.php b/src/Seo.php index 1aefd97..e9421ee 100644 --- a/src/Seo.php +++ b/src/Seo.php @@ -147,10 +147,13 @@ public static function save(Model $model, $url, $data = []) $page->saveMeta($metaValues); $page->saveMeta(static::upload(request()->file('meta'))); + // Its time to refresh cache or making new cache + $tag = new Tag($page); + $tag->make()->save(); } return $page; } catch (\Exception $e) { - Log::error($e->getMessage()); + Log::error($e->getMessage() . 'on Line ' . $e->getLine() . ' in ' . $e->getFile()); } } @@ -178,7 +181,7 @@ public function cache() public static function upload($files) { $imageMeta = []; - $metaImages = request()->file('meta'); + $metaImages = request()->file('meta', []); $imageDriver = config('seo.storage.driver', 'public'); $imagePrefix = config('seo.storage.prefix', 'storage'); diff --git a/src/Tag.php b/src/Tag.php index 3548017..743bf7b 100644 --- a/src/Tag.php +++ b/src/Tag.php @@ -197,7 +197,7 @@ public function show() { if ($this->hasPage()) { return $this->make()->asHtml(); - } + } } /**