Updates for Videos

This commit is contained in:
Deon George
2019-12-15 23:34:42 +11:00
parent 075d31e9f4
commit 49933382f3
14 changed files with 376 additions and 254 deletions

View File

@@ -2,7 +2,6 @@
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Support\Facades\Log;
class Photo extends Abstracted\Catalog
@@ -60,7 +59,7 @@ class Photo extends Abstracted\Catalog
public function getHtmlImageURL(): string
{
return sprintf('<img height="240" src="%s"></img>',url('/p/thumbnail/'.$this->id));
return sprintf('<img class="p-3" src="%s">',url('p/thumbnail',$this->id));
}
/**
@@ -143,7 +142,7 @@ class Photo extends Abstracted\Catalog
return $imo->getImageBlob();
}
public function property($property)
public function property(string $property)
{
if (! $this->o())
return NULL;
@@ -175,10 +174,6 @@ class Photo extends Abstracted\Catalog
return $this->o() ? $this->_o->getImageProperties() : [];
}
public function getDateCreatedAttribute() {
return Carbon::createFromTimestamp($this->attributes['date_created']);
}
public function setDateCreated()
{
$this->date_created = $this->property('creationdate');