classes/Models/Change.php
static public function logPublishingChange(
        Model $model,
        $action,
        Admin $admin = null)
    {
        if ($model->isDirty('public')) {
            if ($model->public) {
                static::createLog($model, 'published', $admin);
            } else if (!$model->public && $action != 'created') {
                static::createLog($model, 'unpublished', $admin);
            }
        }
    }
static public function logPublishingChange(
        Model $model,
        $action,
        Admin $admin = null)
    {
        if ($model->isDirty('public')) {
            if ($model->public) {
                static::createLog($model, 'published', $admin);
            } else if (!$model->public && $action != 'created') {
                static::createLog($model, 'unpublished', $admin);
            }
        }
    }
static public function logPublishingChange ( Model $ model , $ action , Admin $ admin = null ) { if ( $ model -> isDirty ( 'public' ) ) { if ( $ model -> public ) { static :: createLog ( $ model , 'published' , $ admin ) ; } else if ( ! $ model -> public && $ action != 'created' ) { static :: createLog ( $ model , 'unpublished' , $ admin ) ; } } }
Log changes to publishing state.  The initial publish should be logged
but not an initil unpublished state.

@param  Model  $model
@param  string $action
@param  Admin $admin
@return void
Log changes to publishing state . The initial publish should be logged but not an initil unpublished state .