public function generatePermid()
    {
        if($this->permid)
        {
            return $this;
        }

        $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
        //random string always begins with a letter
        $randomString = $characters[rand(10, strlen($characters) - 1)];
        for ($i = 1; $i < 24; $i++) {
            $randomString .= $characters[rand(0, strlen($characters) - 1)];
        }
        $this->permid = $randomString;

        return $this;
    }