Added flashes support in controller and template