定制 plank/publisher 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

plank/publisher

最新稳定版本:v13.11.4

Composer 安装命令:

composer require plank/publisher

包简介

A workflow for publishing content in Laravel applications.

README 文档

README

PHP Version Support Laravel Version Support GitHub Workflow Status

Laravel Publisher

Publisher is a Laravel package that provides a complete content publishing workflow, allowing you to maintain both published and draft versions of your content simultaneously. Editors can work on changes without affecting the live published version until changes are explicitly published.

Installation

  1. Install the package via composer:

    composer require plank/publisher
  2. Add the Publishable interface and IsPublishable trait to your models:

    <?php
    
    namespace App\Models;
    
    use Illuminate\Database\Eloquent\Model;
    use Plank\Publisher\Concerns\IsPublishable;
    use Plank\Publisher\Contracts\Publishable;
    
    class Post extends Model implements Publishable
    {
        use IsPublishable;
    }
  3. Run the install command:

    php artisan publisher:install
  4. Add the publisher columns to your model if you did not generate them automatically:

    <?php
    
    use Illuminate\Database\Migrations\Migration;
    use Illuminate\Database\Schema\Blueprint;
    use Illuminate\Support\Facades\Schema;
    
    return new class extends SnapshotMigration
    {
        public function up()
        {
            Schema::table('posts', function (Blueprint $table) {
                $table->string('status');
                $table->boolean('has_been_published');
                $table->boolean('should_delete');
                $table->json('draft')->nullable();
            });
        }
    }
  5. Run migrations:

    php artisan migrate

Documentation

For complete documentation including configuration, features, and advanced usage, see the Documentation.

Quick Links:

 

Contributing

Please see CONTRIBUTING for details.

 

Credits

 

License

The MIT License (MIT). Please see License File for more information.

 

Security Vulnerabilities

If you discover a security vulnerability within Publisher, please send an e-mail to security@plank.co. All security vulnerabilities will be promptly addressed.

 

Check Us Out!

 

Plank focuses on impactful solutions that deliver engaging experiences to our clients and their users. We're committed to innovation, inclusivity, and sustainability in the digital space. Learn more about our mission to improve the web.

统计信息

  • 总下载量: 3.71k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固