

Feel free to use any of the other methods of bootstrapping Laravel applications if you prefer them. The first thing we need to do is to bootstrap a new Laravel application. Create the backend application Bootstrap the Laravel application

This JSON response will indicate both that the process failed and why. If server-side validation failed or if the user could not be successfully subscribed, a JSON response will also be sent to the user.

When the client receives this, it will hide the form and display a message confirming that everything went well. If the server-side validation passes, the user will be registered and an email will be sent to them confirming their registration.Īt this point, a JSON response will be sent to the client confirming signup success. If client-side validation is successful, the email address will be sent as a JSON object to the server. The form will be validated on both the client- and server-side after submission. When the user requests the default route ( /), they'll see a form asking them to provide their email address so they can sign up for notifications from The Little PHP Shop. The application will have two routes, / and /signup, both handled by a single controller, named LandingPageController. The landing page will allow users to sign up for notifications about upcoming offers from the fictitious online store that I created - The Little PHP Shop -in a recent SendGrid tutorial

