FEATURE: add content page overview
This commit is contained in:
@@ -74,4 +74,17 @@ class Template
|
||||
|
||||
return config('app.url') . '/assets/' . config('app.theme') . '/' . $path;
|
||||
}
|
||||
|
||||
public static function date($datestamp, $withTime = true)
|
||||
{
|
||||
$timestamp = strtotime($datestamp);
|
||||
|
||||
if ($timestamp <= 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$format = $withTime ? config('app.datetime_format') : config('app.date_format');
|
||||
|
||||
return date($format, $timestamp);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user