This post is a continuation of Ashutosh Kukreti blog post of Building a forum with Dancer2.

I this post, we are going to enhance the authentication to use the MySQL Database. I am going to leverage on the DBIx class to achieve this.

Required:

· login page with get request.

· A form in the login page to take user credential with some styling.

· post request to validate user credential.

· Redirect page for validated user.

Start with creating the login subroutine with the following route.

get ‘/login’ => sub {

template ‘login.tt’;

};

Next you create a login.tt…

Chukwuka Isaac

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store