【发布时间】:2015-03-30 16:21:59
【问题描述】:
我有这个奇怪的错误......我显然不能在我的项目中使用我的任何模型类...... Ad_category 模型
class Ad_category extends Eloquent {
protected $table = 'ad_category';
protected $fillable = array('*');
use SoftDeletingTrait;
protected $dates = ['deleted_at'];
}
调用它
$ad_cat=Ad_category::find(1);
错误
`Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_ERROR)
Class 'Ad_category' not found `
【问题讨论】:
-
我在您的问题中的任何地方都看不到
Ad_target,除了错误消息... -
哎呀对不起@lukasgeiter ad_target 或类别我得到同样的错误
-
这个类的命名空间是什么?您使用的是什么自动加载方案?你试过
composer dumpautoload吗? -
没有使用命名空间......和它的默认自动加载方案......让我尝试转储自动加载