PHP code example of juvpengele / laravel-letexto

1. Go to this page and download the library: Download juvpengele/laravel-letexto library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

juvpengele / laravel-letexto example snippets


        use Letexto\Resources\Campaign;
  
       $campaigns = Campaign::filterBy(['status' => 'sent'])->fetchAll();

    

        use Letexto\Resources\Campaign;
  
        $campaign = Campaign::create(['name' => 'My campaign'])
                ->withAttributes([
                    'sender' => 'John Doe', // Add one of your application senders
                    'recipientSource' => 'custom',
                    'campaignType' => 'SIMPLE',
                    'responseUrl' => 'https://mywebsite.com/campaign-feedback', // Add your response url callback    
                ])
                ->to([
                    ['phone' => '22501010101']
                ])
                ->withMessage('Hello world')
                ->send();
    

      use Letexto\Resources\Campaign;

      $campaign = Campaign::find("f9r4gegetg49getg98e49t");
      $messages = $campaign->getMessages();
     

       use Letexto\Resources\Message;
  
       $messages = Message::filterBy(['sender' => 'John Doe'])->fetchAll();
    

        use Letexto\Resources\Message    
  
        $statistics = Message::getStatistics();
    

          use Letexto\Resources\Volume;
          
          $volume = Volume::retrieve();