public function updateQueueState(int $state)
    {
        if ($this->isQueueable()) {
            $this->getInstance()
                ->getConnection()
                ->table($this->getInstance()->getTable())
                ->where($this->getInstance()->getQualifiedKeyName(), $this->getInstance()->getKey())
                ->update([
                    "{$this->name}_queue_state" => $state,
                ]);
        }
    }
public function updateQueueState(int $state)
    {
        if ($this->isQueueable()) {
            $this->getInstance()
                ->getConnection()
                ->table($this->getInstance()->getTable())
                ->where($this->getInstance()->getQualifiedKeyName(), $this->getInstance()->getKey())
                ->update([
                    "{$this->name}_queue_state" => $state,
                ]);
        }
    }
public function updateQueueState ( int $ state ) { if ( $ this -> isQueueable ( ) ) { $ this -> getInstance ( ) -> getConnection ( ) -> table ( $ this -> getInstance ( ) -> getTable ( ) ) -> where ( $ this -> getInstance ( ) -> getQualifiedKeyName ( ) , $ this -> getInstance ( ) -> getKey ( ) ) -> update ( [ "{$this->name}_queue_state" => $ state , ] ) ; } }
Use the model's connecting and table to quickly update the queue state and
bypass the save event in the model to prevent an event loop.

@param int $state

@return void
Use the model s connecting and table to quickly update the queue state and bypass the save event in the model to prevent an event loop .