【发布时间】:2014-11-11 15:01:11
【问题描述】:
我正在尝试使用 public_path 帮助程序在我的模型中定义一些标准文件夹,但出现以下错误。不能在模型中使用辅助函数吗?在控制器中一切正常。
class Varaimage extends \Eloquent {
public $sizes = array(
array('folder'=>'/large/', 'width'=>'1000'),
array('folder'=>'/thumb/', 'width'=>'150')
);
public $folder = public_path().'/images/varor/';
exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'syntax error, unexpected '(', expecting ',' or ';'' in /var/www/html/kollavaran/app/models/Varaimage.php:13
【问题讨论】: