I want to apply a gradient effect and have it look like in this image.
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
There are two ways I found in Adobe Illustrator these both are in envelope distort command under Object Menu::
Take a rectangle or any shape put gradient inside it and run these two commands to modify your shapes and the gradient will run in the same direction.