In no event shall a prisoner bring a civil action or appeal a judgment in a civil action or proceeding in forma pauperis if the prisoner has, on three or more prior occasions while incarcerated or detained in any facility, brought an action or appeal in a state court that was dismissed on the grounds that it was frivolous, was malicious, failed to state a cause of action, or failed to state a claim upon which relief may be granted, unless the prisoner is under imminent danger of serious physical injury.
La. R.S. § 15:1187