我有一个问题,请帮助我,我正在使用查找功能,并获取此格式下的数据。我想在找到
之后添加一个完整的路径到我的图像字段[Category] => Array
(
[0] => Array
(
[id] => 1
[name] => Chicken
[description] => Virginia, looked up one of the more obscure Latin words, consectetur
[image] => 20140124121626.jpg
[restaurant_id] => 1
)
)
我可以将其扩展为“http://website.com/files/restaurants/thumb/20140124120912.jpg”
谢谢
答案 0 :(得分:0)
试试这个
$this->Category->virtualFields['new_image'] = 'CONCAT(" SITE URL HERE",Category.image)';
$data = $this->Category->find('first');
pr($data);
希望它会帮助你:)