
$rawSchema = ThemeAssetEntity::select('schema')
->where('theme_id', '=', $this->getThemeId())
->where('category', '=', ThemeAssetEntity::CATEGORY_PAGE)
->where('asset_key', 'regexp', $this->themeLayout->getTemplateExtensionsPattern($basename))
->first();
var_dump($rawSchema);
exit;


$rawSchema = ThemeAssetEntity::select('schema')
->where('theme_id', '=', $this->getThemeId())
->where('category', '=', ThemeAssetEntity::CATEGORY_PAGE)
->where('asset_key', 'regexp', $this->themeLayout->getTemplateExtensionsPattern($basename));
$query = str_replace(array('?'), array('\'%s\''), $rawSchema->toSql());
$query = vsprintf($query, $rawSchema->getBindings());
dump($query);
exit;
select `schema` from `theme_asset` where `theme_id` = '96b1c8b9-5b18-4760-9e26-50ab009ac011' and `category` = 'page' and `asset_key` regexp '^pages/\product_detail(\.blade\.php|\.liquid|\.json)'
select `schema` from `theme_asset` where `theme_id` = '96dcab33-3e1d-4279-ab96-39693f03515f' and `category` = 'page' and `asset_key` regexp '^pages//product_detail(\.blade\.php|\.liquid|\.json)'
public function getTemplateExtensionsPattern($basename)
{
$escapeDot = array_map(function($extension){
return str_replace('.', '\\.' ,$extension);
}, $this->getTemplateExtensions());
print_r(DIRECTORY_SEPARATOR);
exit;
return sprintf('^%s%s%s%s', $this->getPageDir(), '/'.DIRECTORY_SEPARATOR, $basename, '('.join('|', $escapeDot) .')');
}
\
/

public function getTemplateExtensionsPattern($basename)
{
$escapeDot = array_map(function($extension){
return str_replace('.', '\\.' ,$extension);
}, $this->getTemplateExtensions());
return sprintf('^%s%s%s%s', $this->getPageDir(), '/', $basename, '('.join('|', $escapeDot) .')');
}
"select `schema` from `theme_asset` where `theme_id` = '96dcab33-3e1d-4279-ab96-39693f03515f' and `category` = 'page' and `asset_key` regexp '^pages/product_detail(\.blade\.php|\.liquid|\.json)'"
Linux 服务器运维、部署与线上故障排查
如果你的网站或后端服务部署在 Linux 服务器上,遇到访问异常、Nginx 配置问题、MySQL / Redis 异常、Docker 服务不可用、磁盘占满、CPU / 内存过高等问题,可以联系我做一次远程排查。
适合以下场景:
✅ 网站打不开或访问不稳定
✅ Nginx / PHP-FPM 配置异常
✅ MySQL / Redis 性能或连接问题
✅ Docker 服务部署与维护
✅ 服务器迁移与环境配置
✅ CPU / 内存 / 磁盘异常排查
服务内容:
✅ Linux 环境检查
✅ 网站部署与迁移
✅ Nginx / PHP-FPM / MySQL / Redis 排查
✅ Docker 配置与维护
✅ 服务器性能分析
✅ 长期远程运维支持
如需咨询,请联系我,并注明:Linux 运维咨询。
联系方式:
Telegram:@shuijingwan
微信:13980074657
邮箱:shuijingwanwq@gmail.com

发表回复