Properly implemented OG

This commit is contained in:
Pablo Ferreiro 2022-11-26 23:51:45 +01:00
parent ee6e8b0593
commit 215f984fe4
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
16 changed files with 87 additions and 50 deletions

View file

@ -1,18 +1,20 @@
<?php
namespace App\Models;
use TikScraper\Models\Info;
/**
* Base for templates with a feed
*/
class VideoTemplate extends BaseTemplate {
public object $item;
public object $detail;
public Info $info;
public string $layout = 'hero';
function __construct(object $item, object $detail, bool $isEmbed = false) {
function __construct(object $item, Info $info, bool $isEmbed = false) {
parent::__construct('Video');
$this->item = $item;
$this->detail = $detail;
$this->info = $info;
if ($isEmbed) {
$this->layout = 'embed';
} else {