Ajiet-DevNation / DevNation-CMS

This is a CMS site for our student community DevNation.
15 stars 24 forks source link

User should recieve a mail notification on event registeration #128 #213

Open LKyz24 opened 3 weeks ago

LKyz24 commented 3 weeks ago

This pull request addresses issue #128 by adding the register() function in EventController, which handles user registration for events. It retrieves the logged-in user's name and the event ID, creates a registration record in the database, and sends a notification to the user mail while redirecting them to the event details page with message of success on top of page.

The notification class EventNotification, which sends an e-mail to the user about successful registration for the event with the necessary information, was also modified. The email message is generated using the events.event_registration view, which displays the username, event name, and a link to the event details.

The events.event_registration.blade.php file serves as a template for the registration confirmation email, including a logo, a header, the user's name, confirmation of registration, and a link to the event details. Additionally, the user registration form HTML fragment in events.show.blade.php and events. mail notification index.blade.php points to the events.register route with the event ID, using the POST method with CSRF protection, and features a "Register Now" button for submitting the form to the server.

Ensure that some events are created in the database, for testing the very sending of the notification to the mail.

I am also sending a picture of such a notification with an invented user event.

darshan45672 commented 3 weeks ago

@LKyz24 great work, i appreciate your effort and commitment. my team has already started working on it and are almost done with the email notification part

Few things to be highlighted

your pr has lots of conflicts with the main branch to be merged resolve it, update your existing fork and update the festure then raise a pr again till then i'll not merge this.