FEATURE: add blade template registration into templates
This commit is contained in:
@@ -21,10 +21,8 @@ class Template
|
||||
$namespace .= '::';
|
||||
}
|
||||
|
||||
$theme = config('app.theme');
|
||||
|
||||
// list of prefixes
|
||||
$prefixes = [$theme . '.custom.', $theme . '.', ''];
|
||||
$prefixes = ['custom.', ''];
|
||||
|
||||
$view = null;
|
||||
foreach ($prefixes as $prefix) {
|
||||
@@ -59,6 +57,13 @@ class Template
|
||||
return config('app.upload_url') . '/' . $filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get path to given asset
|
||||
*
|
||||
* @param $path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function asset($path)
|
||||
{
|
||||
if (env('APP_DEBUG')) {
|
||||
@@ -75,6 +80,14 @@ class Template
|
||||
return config('app.url') . '/assets/' . config('app.theme') . '/' . $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print date in configured format
|
||||
*
|
||||
* @param $datestamp
|
||||
* @param bool $withTime
|
||||
*
|
||||
* @return false|string
|
||||
*/
|
||||
public static function date($datestamp, $withTime = true)
|
||||
{
|
||||
$timestamp = strtotime($datestamp);
|
||||
|
||||
Reference in New Issue
Block a user