title = '通知消息'; NoticeNotice::mQuery()->layTable(function () { $this->types = NoticeNotice::types(); }, static function (QueryHelper $query) { $query->where('staff_id', '=', session('user.id')); $query->equal('status')->like('type,content'); }); } public function read() { NoticeNotice::mSave([ 'read_at' => date('Y-m-d H:i:s'), ], '', [ 'staff_id' => session('user.id'), 'read_at' => null ]); } }