►Laravel 9 Tutorial from the beginning:- • Laravel Multi Vendor Tutorial
In Part-186 of the Multi Vendor E-commerce series, we will continue working on the Newsletter Subscriber feature in which users can subscribe to the website newsletter by entering their emails.
In this video, we will display newsletter subscribers emails in the admin panel with active/inactive and delete functionality.
1) Update sidebar.blade.php file:-
First of all, add the "Newsletter Subscribers" link at the admin sidebar.
2) Create NewsletterController
Now create NewsletterController located at Admin folder with artisan command like below :-
php artisan make:controller Admin/NewsletterController
3) Create Route:-
Create Get route for newsletter subscribers in web.php file like below:-
// Newsletter Subscribers
Route::get('newsletter-subscribers','NewsletterController@newsletterSubscribers');
4) Create newsletterSubscribers Function :-
Now create newsletterSubscribers Function at NewsletterController located at Admin folder to get all newsletter subscribers emails.
5) Create newsletter_subscribers.blade.php file:-
Now create the newsletter_subscribers.blade.php file at /resources/views/admin/subscribers/ path where we will display all newsletter subscribers emails in foreach loop.
Now we will work on active/inactive status for Newsletter Subscribers
6) Create Route :-
Create Post route in web.php file to update subscriber status like below :-
Route::post('update-subscriber-status','NewsletterController@updateSubscriberStatus');
7) Create updateSubscriberStatus function :-
Now create updateSubscriberStatus function at NewsletterController located at Admin folder to update the subscriber status.
8) Update custom.js file :-
Don't forget to add updateSubscriberStatus jQuery function at custom.js file to update subscriber status via Ajax.
Now we will work on delete functionality for Subscriber.
9) Create Route :-
We will create Get route to delete subscriber in web.php file like below :-
Route::get('delete-subscriber/{id}','NewsletterController@deleteSubscriber');
10) Create deleteSubscriber function :-
We will create deleteSubscriber function at NewsletterController located at Admin folder to delete the subscriber.
In the next video, we will work on newsletter subscriber functionality on the home page of the website. We will create a newsletter subscriber field and will insert the subscriber email in the newsletter_subscribers table if not already exists.
►Laravel 9 Tutorial Playlist (Create Multi-Vendor E-commerce Website) - • Laravel Multi Vendor Tutorial
►Click here to subscribe for Laravel & other updates - / stackdevelopers
Popular Stack Developers Series that can help you:-
►React JS Tutorial for Beginners with Laravel 9 - • React JS Tutorial with Laravel for Be...
►Laravel Tutorial for Beginners - • Laravel Tutorial for Beginners | Adva...
►GIT Tutorial for Beginners - • Git Tutorial for Beginners | Create y...
►Laravel API Tutorial - • Laravel API Tutorial | Create API fro...
►Laravel Interview Questions - • Laravel Interview Questions & Answers...
►jQuery Tutorial - • jQuery Tutorial
►Laravel Basic E-commerce Series - • Make Admin Panel / E-commerce Website...
►Laravel Dating Series - • Make Dating / Social Networking Websi...
►Join this channel to get the complete source code of all series:
/ @stackdevelopers
Follow Stack Developers on Social Media to get updates and resolve your queries
►Like Facebook Page to get updates - / stackdevelopers2
►Join Facebook Group to resolve your queries - / stackdevelopers
►Follow on Instagram - / stackdevelopers2
►Follow on GitHub - https://github.com/stackdevelopers
#laravel9 #laravel9tutorial #laravel