Minor fixes

This commit is contained in:
Deon George
2019-12-21 22:57:34 +11:00
parent bcdbc1715e
commit 4adf66c318
7 changed files with 40 additions and 39 deletions

View File

@@ -155,7 +155,6 @@ abstract class Catalog extends Model
/**
* Determine the new name for the image
* @todo Make Generic for Photo and Video
*/
public function file_path($short=FALSE,$new=FALSE)
{
@@ -229,7 +228,7 @@ abstract class Catalog extends Model
}
public function getDateCreatedAttribute() {
return Carbon::createFromTimestamp($this->attributes['date_created']);
return $this->attributes['date_created'] ? Carbon::createFromTimestamp($this->attributes['date_created']) : NULL;
}
/**