PHPackages                             contrainteractive/content-scheduler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. contrainteractive/content-scheduler

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

contrainteractive/content-scheduler
===================================

v1.0.0(1y ago)01MITPHP

Since Jan 21Pushed 1y ago3 watchersCompare

[ Source](https://github.com/ContraInteractive/laravel-content-scheduler)[ Packagist](https://packagist.org/packages/contrainteractive/content-scheduler)[ RSS](/packages/contrainteractive-content-scheduler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

### Installation

[](#installation)

You can install the package via composer:

```
composer require 'contrainteractive/content-scheduler'
```

Once the package is installed, you should publish the migration files and run the migration:

```
php artisan vendor:publish --provider="ContraInteractive\ContentScheduler\Providers\ContentSchedulerServiceProvider" --tag="migrations"
php artisan migrate
```

### The Content Scheduler pkg provides a convenient way to associate and manage scheduling information with any Eloquent model:

[](#the-content-scheduler-pkg-provides-a-convenient-way-to-associate-and-manage-scheduling-information-with-any-eloquent-model)

- A polymorphic relationship to a ContentSchedule record.
- Helpful accessors for scheduled/actual publish/unpublish timestamps.
- Methods to quickly check whether the model is published, unpublished, scheduled, or canceled.
- Query scopes for filtering by schedule status.
- Scheduled job/command to publish or unpublish the model at the appropriate time.

Usage
-----

[](#usage)

Your Eloquent models should use the `ContraInteractive\ContentScheduler\Traits\Schedulable` trait and the `ContraInteractive\ContentScheduler\Traits\HasScheduling` class.

Here's an example of how to implement the traits:

```
