PHP code example of myowncode / symfony-turbosms

1. Go to this page and download the library: Download myowncode/symfony-turbosms 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/ */

    

myowncode / symfony-turbosms example snippets




// app/config/bundles.php

return [
    // some other bundles
    Myowncode\TurboSmsBundle\MyowncodeTurbosmsBundle::class => ['all' => true],
];

 

namespace App\YourBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

class MyCustomController extends Controller
{
    /**
     * @Route("/")
     * @Template()
     */
    public function indexAction(): void
    {
        // some code goes here
        $this->get('myowncode_turbosms')->send("test", "+XXXXXXXXXXXX");
        // some code goes here
    }
}
bash
$ php bin/console doctrine:schema:update --dump-sql