I am trying to send email using laravel framework,but I can't.Actually when I put my code and trying to run on wamp server. I got this error.
InvalidArgumentException in FileViewFinder.php line 137: View [emailconfirm] not found.
My Route code:
Route::get('sendemail','admin\LoginController@sendemail');
MY Controller code:
namespace App\Http\Controllers\admin;
use Illuminate\Support\Facades\Auth;
use Validator;
use Illuminate\Http\Request;
use DB;
use Hash;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Input;
use Mail;
use App\Mail\Reminder;
public function sendemail(Request $request)
{
$postsite1234 = $request->all();
$email = $postsite1234['email'];
$to_email = 'bdt.svk@gmail.com';
Mail::send('emailconfirm',['name' => 'yuven'], function ($message){
$message->to($to_email,'vijay')
->subject('code');
$message->from('vijay@app.com', 'vijay');
});
}
Can I send email using wamp server in localhost.? Is that work? please help If you can.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire