Gratuity at the end of work

My company has not given gratuity so far to the people who have resigned, by law can I ask them?