作为标题,我试图获取数据
equal id
具有
==
但结果是空数组,我错过了什么吗?…
â page php artisan tinker
Psy Shell v0.9.8 (PHP 7.1.16 â cli) by Justin Hileman
>>> $page = App\PageAtribut::where('page_id', '<', 2)->get()
=> Illuminate\Database\Eloquent\Collection {#2858
all: [
App\PageAtribut {#2844
id: 1,
page_id: 1,
watchable_id: 1,
watchable_type: "App\Category",
created_at: "2018-09-11 11:03:20",
updated_at: "2018-09-11 11:03:20",
},
App\PageAtribut {#2861
id: 2,
page_id: 1,
watchable_id: 2,
watchable_type: "App\User",
created_at: "2018-09-11 11:03:40",
updated_at: "2018-09-11 11:03:40",
},
],
}
>>> $page = App\PageAtribut::where('page_id', '==', 1)->get()
=> Illuminate\Database\Eloquent\Collection {#2846
all: [],
}
>>>