【发布时间】:2019-01-30 09:07:04
【问题描述】:
我有默认的 laravel 通知数据字段和默认的通知表 只尝试根据他的通知数据值为用户选择一些通知我已经在用户模型中创建了这个函数
public function notifications_data($col)
{
$notifications = $this->notifications()->where('data' , function ($q) use ($col){
$q->where('appointment_id','0'); // query data as table
})->get();
return ($notifications);
}
我在通知表 col 数据中保存了值 { "type":"Appointment", "appointment_id":"0", "date":null, "updated_by":"","status":"0" }
我如何获取所有状态 = 0 或约会 ID = 0 的通知
【问题讨论】:
标签: json laravel notifications