Step-1 open terminal as a git base here in C:\xampp\htdocs look a pic
After click on git base Here it will be open like this look a pic.
After an open the terminal, you have to paste this code in the terminal below this code for making laravel project.and press enter to run this project. It will take a few minutes for installing this project.
composer create-project --prefer-dist laravel/laravel ImageUploadMailSend "5.8.*"
Step-2 After installed the project type in your terminal for inter the project cd ImageUploadMailSend
Step-3 Open this project in any code editor like that notepad++,visual code. and go to .env file and write database name.
Step-4 make database in follow this step.
Step:5 After start Apache and MySql ,open browser write this url http://localhost/phpmyadmin/server_databases.php then make database anme.
Step-6 mkae a controller.
php artisan make:controller SendEmailController
Step:7 make a model
php artisan make:model UploadImage -m
Step:8 write a column name in this table name, email, image. database\migrations\2020_10_23_070450_create_upload_images_table.php
Step-9 Then migrate table
go to terminal and write this keyword for migrate
php artisan migrate
Step:10 Then make a view page send_email.blade.php
This is code of send_email.blade.php
Step:11 make one blade page resources/view/dynamic_email_template.blade.php
Step-12. make route go to and write this code in web.php
Step-14 go to controller and call model class.
Step:15 make a mail
php artisan make:mail SendMail
Step-16 go to Mail/Sendmail then write this code. it will work for send mail.
Step-17 open mailtrap and make a account,
Step-18 Then Configure .env file
Step-19– After run this command in the terminal
php artisan c:cache
php artisan serve after serve you can run run this url in your broswer
- Upload image in the database with local folder and image send mail. - October 23, 2020
- How to protect .env file in Laravel. - September 10, 2020
- How to upload laravel project on cPanel. - September 9, 2020