Draft is a publishable Moox Entity that can be used to create and manage Pages, Posts, etc.
- Publish (or schedule)
- Unpublish (or schedule)
- Soft Delete
- Supports Taxonomies
- Supports Relations
- Supports Modules
- Title with Slug fields
- Active field (Toggle)
- Description field (Editor)
- Content field (Markdown)
- Data field (Key-Value)
- Image field (Media)
- Author field (User)
- Type field (Select)
- Due field (DateTime)
- Color field (Color)
- UUID field (UUID)
- ULID field (ULID)
See Requirements.
composer require moox/draft
php artisan moox:install
Curious what the install command does? See Installation.
See Get Started.
Please see CHANGELOG for more information on what has changed recently.
Please see ROADMAP for more information on what is planned for this package.
Please review our security policy on how to report security vulnerabilities.
Thanks to so many people for their contributions to this package.
The MIT License (MIT). Please see our license and copyright information for more information.
The Draft model comes with several powerful features and capabilities:
is_active
(boolean) - Activation statusdata
(json) - Flexible JSON data storagetype
- Content type (Post/Page)status
- Publication status (draft/waiting/private/scheduled/published)color
- Custom color codingdue_at
(datetime) - Due dateuuid
- Universally Unique Identifierulid
- Universally Unique Lexicographically Sortable Identifier
title
- Content titleslug
- URL-friendly identifierdescription
- Brief descriptioncontent
- Main contentauthor_id
- Content author referenceto_publish_at
- Scheduled publish datepublished_at
- Actual publish dateto_unpublish_at
- Scheduled unpublish dateunpublished_at
- Actual unpublish date
- Supports media attachments via Spatie Media Library
- Automatic image conversions for previews
- Media relationship through usables
- Scheduled publishing support
- Publication status tracking
- Unpublishing capability
- Audit trail for publishing actions
isScheduledForPublishing()
- Check if content is scheduledisPublished()
- Check publication statusisScheduledForUnpublishing()
- Check unpublishing scheduleisUnpublished()
- Check if unpublishedhandleSchedulingDates()
- Manage scheduling dateshandlePublishingDates()
- Handle publication dates
scopeScheduledForPublishing()
scopePublished()
scopeScheduledForUnpublishing()
scopeUnpublished()
scopeRestored()
author()
- Author relationshippublishedBy()
- Publishing actorupdatedBy()
- Update actorcreatedBy()
- Creation actorunpublishedBy()
- Unpublishing actordeletedBy()
- Deletion actorrestoredBy()
- Restoration actor
- Soft deletes support
- Multi-language support
- Taxonomy integration
- Automatic UUID/ULID generation
- Media library integration
- Publishing workflow management
- Audit trail for all major actions