The Dhammika Sutta is part of the Sutta Nipata(Sn 2.14). In this sutta, the Buddha instructs a lay disciple named Dhammika on rules for monks and on the "layman's rule[s] of conduct" (gahatthavatta).
In the sutta, Dhammika, along with 500 other lay followers (Pali: pancahi upasake-satehi), approaches the Buddha and his monks (Pali: bhikkhavo) and Dhammika asks the Buddha how should a disciple (Pali: sāvako) be virtuous (Pali: sādhu) — both a disciple who has gone from home to homeless (Pali: agārā anagārameti) and a disciple from a household (Pali: agārino ... panupāsakāse). Dhammika then proceeds to extol the Buddha's compassion and wisdom.
In response to Dhammika's question, the Buddha first addresses his monks and advises them as follows:
The Buddha notes that a householder's obligations prevent a householder from fully pursuing a monk's path. Thus, the Buddha articulates "the layman's duty" (Pali: gahatthavatta), what are essentially the Five Precepts, as follows:
For the Uposatha, the Buddha extols the practice of the Eight Precepts, which involve the aforementioned Five Precepts (with celibacy alone identified for the third precept) and the following three precepts added:
The Buddha further stated that, when celebrating the Uposatha, with a purified heart (Pali: pasanna citto) and rejoicing mind (Pali: anumodamāno), the wise (Pali: viññu) share their food and drink with monks of the Sangha.
In the sutta's last verse, the Buddha advises that, if a lay person supports their parents and engages in fair trading, they will be reborn among self-radiant devas.