Cartalyst\Sentinel\Persistences\IlluminatePersistenceRepository::flush PHP Method

flush() public method

{@inheritDoc}
public flush ( Cartalyst\Sentinel\Persistences\PersistableInterface $persistable, $forget = true )
$persistable Cartalyst\Sentinel\Persistences\PersistableInterface
    public function flush(PersistableInterface $persistable, $forget = true)
    {
        if ($forget) {
            $this->forget();
        }
        foreach ($persistable->{$persistable->getPersistableRelationship()}()->get() as $persistence) {
            if ($persistence->code !== $this->check()) {
                $persistence->delete();
            }
        }
    }