Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($user->save()) {
- $data = DB::table('posts')->get();
- $data = array(
- 'description' => $request->description,
- 'Location'=> $request->Location,
- 'lat' => $request->lat,
- 'lng' => $request->lng,
- );
- Mail::send('contact',$data,function($message) use($data) {
- //Mail has been sent but both the From and To email address are same
- // i.e. abc@gmail.com not Logged in user's email
- $message->from(Auth::user()->email);
- //to email address which i have hard coded
- $message->to('abc@gmail.com');
- $message->subject($data['Location']);
- });
- return redirect('/index');
- }
- }
- if ($user->save()) {
- $data = DB::table('posts')->get();
- $data = array(
- 'description' => $request->description,
- 'Location'=> $request->Location,
- 'lat' => $request->lat,
- 'lng' => $request->lng,
- );
- if (Auth::check()
- {
- $email = User::whereId(Auth::user()->id)->value('email');
- }
- Mail::send('contact',$data,function($message) use($data) {
- //Mail has been sent but both the From and To email address are same
- // i.e. abc@gmail.com not Logged in user's email
- $message->from($email);
- //to email address which i have hard coded
- $message->to($email);
- $message->subject($data['Location']);
- });
- return redirect('/index');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement