laravel Notifications获取id只能显示成整型

暂无标签

比如原本的id是

296bcb4a-14d2-4067-a708-2310f4b172c0 

ORM 查询id只能获取到296

需要在Notifications的Model中加入

public $incrementing = false;

class Notifications extends Model
{
    protected $table = 'notifications';
    protected $fillable = [''];
    public $incrementing = false;
}