Posts

Showing posts from February, 2019

How to send emails from Laravel

Image
This post is about how to send emails from Laravel in an easy way. step 1 First you have to  create a view in your laravel project for the email message. I will create a view file in resources/views/mail.blade.php   in my project and paste the following piece of line or put what you want to send as the mail. This is a test mail step 2 Then create t he controller class and method for your emailing function. You can customize this as you wish. Run the following command on your project terminal.. php artisan make:controller mailController Then add mail provider  in your controller as following. <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Mail; class mailController extends Controller {     public function send(){         Mail:: send(['text'=>'mail'],['name'=>'piyumikablog'],function($message){             $message->to('usereamil@gmail.com','testi...