Laravel 查询或写入Enum字段出错的bug解决办法

查询:

        if($request->filled('type')){
            $where[] = ['type', strval(intval($request->input('type')))];
        }

写入:

$model->type = '1'

 

posted @ 2019-09-16 23:20  夏秋初  阅读(421)  评论(0编辑  收藏  举报