protected function unpublishOtherRevisions()
    {
        if ($this->content->wasRecentlyCreated) {
            return;
        }

        // Unpublish all other revisions
        Revision::where('content_id', $this->content->id)
            ->where('language_id', $this->revision->language_id)
            ->where('id', '!=', $this->revision->id)
            ->update(['published' => false]);
    }
protected function unpublishOtherRevisions()
    {
        if ($this->content->wasRecentlyCreated) {
            return;
        }

        // Unpublish all other revisions
        Revision::where('content_id', $this->content->id)
            ->where('language_id', $this->revision->language_id)
            ->where('id', '!=', $this->revision->id)
            ->update(['published' => false]);
    }
protected function unpublishOtherRevisions ( ) { if ( $ this -> content -> wasRecentlyCreated ) { return ; } // Unpublish all other revisions Revision :: where ( 'content_id' , $ this -> content -> id ) -> where ( 'language_id' , $ this -> revision -> language_id ) -> where ( 'id' , '!=' , $ this -> revision -> id ) -> update ( [ 'published' => false ] ) ; }
Unpublish the revisions other than this one.
Only for the same content_id and language_id
Unpublish the revisions other than this one . Only for the same content_id and language_id