trinityrank/draft-status

草稿状态包。

安装: 118

依赖: 0

建议者: 0

安全: 0

星星: 0

关注者: 1

分支: 0

公开问题: 0

语言:Vue

v1.2 2022-06-24 10:55 UTC

This package is auto-updated.

Last update: 2024-09-24 15:49:13 UTC


README

Latest Version on Packagist Total Downloads

如何使用

  1. 更新数据库

    Make model columns nullable because draft status dremove field require validations

    向模型添加 'status' 列

    $table->integer('status');
  2. 将 DraftComponents 添加到 Nova 资源的字段数组中

    DraftComponents::make(),
    DraftComponents::index(),
  3. 将 DraftValidator 特性添加到 Nova 资源中

    use DraftValidator;
  4. 将数据库 "status" 字段更新为 "published"

    UPDATE [table_name] SET status = 1 WHERE 1;

安装

您可以通过 composer 安装此包。

composer require trinityrank/draft-status

变更日志

有关最近更改的更多信息,请参阅变更日志

许可

MIT 许可证 (MIT)。有关更多信息,请参阅许可文件