Posts
Showing posts from July, 2023
TWILIO MESSAGE SERVICE
- Get link
- X
- Other Apps
Do some basic steps in TWILIO: https://console.twilio.com/us1/account/manage-account/general-settings https://console.twilio.com/us1/develop/sms/settings/geo-permissions https://console.twilio.com/us1/develop/sms/try-it-out/send-an-sms https://console.twilio.com/us1/monitor/logs/debugger/errors Helper Function: use Twilio\Rest\ Client ; function sendSMS ( $req_dialCode , $req_number , $req_message ){ try { $account_sid = env ( 'TWILIO_SID' ); $account_token = env ( 'TWILIO_TOKEN' ); $account_from = env ( 'TWILIO_FROM' ); if ( isset ( $req_dialCode ) && isset ( $req_number )){ $client = new Client ( $account_sid , $account_token ); // $client->messages->create('+91'.$req_number,[ $client -> messages -> create ( $req_dialCode . $req_number ,[ 'body' => $req_message , "messagingServiceSid" => "MG8705dcb3a
reCAPTURE V3 IMPLEMENTATION IN LARAVEL PROJECT
- Get link
- X
- Other Apps
Add in config/services.php 'recaptcha' => [ 'site_key' => env('RECAPTCHA_SITE_KEY'), 'secret_key' => env('RECAPTCHA_SECRET_KEY'), ], Add in .env file # local developer credential RECAPTCHA_SITE_KEY =value RECAPTCHA_SECRET_KEY =value Add validation in controller function $validator = $request -> validate ( [ "name" => "required" , "contact_no" => "required|numeric" , "email_id" => "required" , "message" => "required" , // "g_recaptcha_response"=> "required", "g_recaptcha_response" => [ "required" , function ( $attribute , $value , $fail ) { $url = 'https://www.google.com/recaptcha/api/siteverify?secret=' . config (