Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Drafts Laravel Package

oddvalue/laravel-drafts

Drop-in drafts and revisions for Laravel Eloquent models. Create, save, publish, and preview revisions with a simple API, middleware support, and minimal setup—ideal for CMS-style editing workflows without building a custom versioning system.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Content Moderation Workflows: Enables a seamless draft/publish system for CMS-like applications (e.g., blogs, marketing pages, or editorial platforms) where content requires approval before public visibility.
  • Multi-Environment Sync: Supports staging/production parity by allowing drafts to be previewed in staging while remaining unpublished in production.
  • Collaborative Editing: Facilitates team workflows where multiple editors draft content concurrently, with clear revision histories and conflict resolution via current()/published() scopes.
  • Build vs. Buy: Avoids reinventing draft/revision logic (e.g., custom middleware, migration scripts, or relation syncing) while maintaining Laravel’s ecosystem compatibility.
  • Roadmap Priorities:
    • Phase 1: Implement drafts for high-traffic content (e.g., landing pages) to reduce downtime during updates.
    • Phase 2: Extend to user-generated content (e.g., forum posts) with role-based publish permissions.
    • Phase 3: Integrate with workflow tools (e.g., Slack notifications for draft approvals).

When to Consider This Package

  • Adopt if:
    • Your Laravel app requires versioned content (e.g., blogs, legal pages) with audit trails for revisions.
    • You need preview environments for drafts without exposing them publicly (via previewMode()).
    • Your models have relations that must sync between drafts/published versions (e.g., posts ↔ tags).
    • You’re using Laravel 9–13 and want a low-maintenance solution (MIT license, active updates).
  • Look elsewhere if:
    • You need fine-grained permission controls (e.g., per-user draft limits) beyond the built-in publisher relation.
    • Your app requires offline drafts or client-side caching of drafts (this is server-side only).
    • You’re using non-relational databases (e.g., MongoDB) or need custom revision storage (e.g., S3).
    • Your team lacks PHP/Laravel expertise to configure traits, middleware, or migrations.

How to Pitch It (Stakeholders)

For Executives: "This package lets us ship content updates without downtime. Editors can draft and preview changes in staging, while the public sees only approved versions. It’s like Git for our database—automated revision history, relation syncing, and a 10-minute setup. Used by [X] teams at [Y] scale, with zero maintenance overhead."

For Engineers: *"Laravel Drafts gives us:

  • Drop-in drafts/revisions for Eloquent models with zero custom queries.
  • Preview mode for admin interfaces (toggle with a facade call).
  • Relation handling: Drafts auto-sync HasOne, HasMany, and BelongsToMany relations.
  • Middleware to restrict draft access to specific routes.
  • Future-proof: Supports Laravel 9–13, with active updates. Example migration:
    Schema::table('posts', fn(Blueprint $table) => $table->drafts());
    
    Tradeoff: Adds 5 columns per model (configurable). Ready for MVP in 2 hours."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi