$dim = SocialImage::getSocialImageSize($this->getFluidbook());
if ($dim) {
- $socialImage = backpack_url('services/socialimage/' . $this->getFluidbook()->cid);
+ $socialImage = backpack_url('services/socialimage/' . $this->getFluidbook()->cid . '/' . time());
$socialImageWidth = $dim[0];
$socialImageHeight = $dim[1];
protected function setupSocialimageRoutes($segment, $routeName, $controller)
{
foreach (['services', 's'] as $segment) {
- Route::match(['get'], $segment . '/socialimage/{cid?}', $controller . '@socialImage')->withoutMiddleware([CheckIfAdmin::class]);
+ Route::match(['get'], $segment . '/socialimage/{cid?}/{time?}', $controller . '@socialImage')->withoutMiddleware([CheckIfAdmin::class]);
Route::match(['get'], $segment . '/socialimage', $controller . '@ws2SocialImage')->withoutMiddleware([CheckIfAdmin::class]);
Route::match(['get'], $segment . '/facebook_thumbnail', $controller . '@ws2SocialImage')->withoutMiddleware([CheckIfAdmin::class]);
}
abort(404);
}
- public function socialImage($cid = null)
+ public function socialImage($cid = null, $time = null)
{
$publication = FluidbookPublication::where('cid', $cid)->first();
if (null === $publication) {