以下是
的查询结果$ customer = Customer :: where(' contact',$ contact) - > first();
App\Customer {#2382
id: 11,
name: "sai",
gender: null,
dob: null,
email: "#######@gmail.com",
contact: "########",
newsletter: 0,
authy_id: "",
verified: 1,
blocked: 0,
cuid: "7D968C49-4029-77BE-692C-67AF002099F6",
created_at: "2018-05-20 13:19:34",
updated_at: "2018-05-20 13:41:12",
deleted_at: null,
rewardPoints: 0,
}
当我查找专栏'阻止'
$客户 - >封端的
我得到它的值0
但是当我起诉条件陈述时
if( $customer->blocked == true )
{
echo 'true' ;
}
或
if( $customer->blocked == 1)
{
echo 'true' ;
}
它总是会返回一个积极的结果。即使价值为0
编辑:这是一个截图php artisan tinker