src/Http/Controllers/ContactPublicController.php
public function sendMail(Request $request)
    {
        
        $data = $request->all();
       Mail::send('contact::emails.message', ['data' => $data], function ($message) use ($data) {
           $message->from($data['email']);
           $message->to('swathy@renfos.com')->subject('Contact Enquiry');
       });
           return $this->response->message('Success! Your message send successfully.')
               ->code(204)
               ->status('success')
               ->url(url('/contacts'))
               ->redirect();

    }
public function sendMail(Request $request)
    {
        
        $data = $request->all();
       Mail::send('contact::emails.message', ['data' => $data], function ($message) use ($data) {
           $message->from($data['email']);
           $message->to('swathy@renfos.com')->subject('Contact Enquiry');
       });
           return $this->response->message('Success! Your message send successfully.')
               ->code(204)
               ->status('success')
               ->url(url('/contacts'))
               ->redirect();

    }
Send mail

@param string $slug

@return response