Maybe you remember Chico Marx, playing a "stage Italian," repeating, "Gets your tuttsi-fruittsi ice-cream," or that cringe-worthy moment in Dirty Harry (1971) when the black character is forced to say, "I gots to know," or when you want to mock a "mick," saying "Sure and begorra, me sainted mother raised me on the Em'rald Isle," and so on.
In writing workshop this is often called "dialect," although technically the English language has only one dialect -- "Pidgin" English, now rare, spoken in the South Seas -- so what you really mean is "accent." But call it what ye will, matey, arrgh, a little goes a long way. Your model for doing it correct-like is Mark Twain. Mid-19th-century American "Southwestern humorists," Twain's forerunners, wrote comic novels about backwoods characters, their texts all misspelled to convey the sound of their speech. From the author George Washington Harris:
Hit am an orful thing, George, tu be a nat'ral born durn'd fool. Yu'se never 'sperienced hit pussonally, hev yu? Hits made pow'fully agin our famerly, an all owin tu dad. I orter bust my head open agin a bluff ove rocks, an' jis' wud du hit, ef I warnt a cussed coward.
It's fun to write, but the irregular spelling makes these texts viciously hard to read. Twain's genius was to let his characters use vernacular speech, but tone the author's artifice way down:
He kept me with him all the time, and I never got a chance to run off. We lived in that old cabin, and he always locked the door and put the key under his head nights. He had a gun which he had stole, I reckon, and we fished and hunted, and that was what we lived on. Every little while he locked me in and went down to the store, three miles, to the ferry, and traded fish and game for whisky, and fetched it home and got drunk and had a good time, and licked me.
These days we worry about being accused of stereotyping. So if your speaker or character has an accent and you absolutely must use it (knowing that it conveys the character's social class and locale), let the character use one or at most two instances of it. Your readers will "get it," keep it in their heads, and won't have to decipher misspellings. Example: "He wrote me from overseas. I have a box of his letters. I saved ever one." That character never again uses her "accent" throughout the whole novel. You can really trust your reader with this. Twain proved it.