这件奇怪的事情发生在我身上,我有下面的代码:
$state_image =States_Images::where('id_state', $id);
echo $delete_path=$state_image->name;结果是:
Undefined property: Illuminate\Database\Eloquent\Builder::$name谁来帮帮我:(
发布于 2016-05-11 02:14:23
您需要使用get()或first()完成查询。在您的情况下,可能是:
States_Images::where('id_state', $id)->first();https://stackoverflow.com/questions/37144564
复制相似问题