loading
main.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
 
namespace App\Http\Controllers;
 
use Illuminate\Http\Request;
use AWS;
 
class SMSController extends Controller
{
    protected function sendSMS($phone_number){
        $sms = AWS::createClient('sns');
    
        $sms->publish([
                'Message' => 'Hello, This is just a test Message',
                'PhoneNumber' => $phone_number,    
                'MessageAttributes' => [
                    'AWS.SNS.SMS.SMSType'  => [
                        'DataType'    => 'String',
                        'StringValue' => 'Transactional',
                     ]
                 ],
              ]);
    }
}
PHP 7.0.8 (Legacy: use the following for new features: Command-line PHP: https://repl.it/languages/php_cli PHP Web Server: https://repl.it/languages/php7