Skip to content

Commit

Permalink
Bug fixing for auto caching
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaldreams committed Oct 17, 2018
1 parent f5efa0e commit 73a78e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/Seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

Expand Down Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion src/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public function show()
{
if ($this->hasPage()) {
return $this->make()->asHtml();
}
}
}

/**
Expand Down

0 comments on commit 73a78e0

Please sign in to comment.