2017 © Pedro Peláez
 

symfony-bundle symfony-turbosms

Symfony2/3 send sms from Turbosms.ua by SOAP Edit

image

avator/symfony-turbosms

Symfony2/3 send sms from Turbosms.ua by SOAP Edit

  • Thursday, May 18, 2017
  • by AVATOR
  • Repository
  • 1 Watchers
  • 1 Stars
  • 86 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 23 % Grown

The README.md

AVATORTurbosmsBundle

This bundle helps you to send sms in Symfony2/3 project., (*1)

Installation

Composer

Download LexxpavlovSettingsBundle and its dependencies to the vendor directory., (*2)

You can use Composer for the automated process:, (*3)

$ composer require avator/symfony-turbosms

or manually add link to bundle into your composer.json and run $ composer update:, (*4)

{
    "require" : {
        "avator/symfony-turbosms": "~1.0"
    }
}

Composer will install bundle to vendor/avator/symfony-turbosms directory., (*5)

Adding bundle to your application kernel

<?php

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new AVATOR\TurbosmsBundle\AVATORTurbosmsBundle(),
        // ...
    );
}

Configuration

# app/config/config.yml


avator_turbosms:
    # required
    login: 'your_login'
    # required
    password: 'your_password'
    # required
    sender: 'your_sender'
    # default value `false`, if debug == `true` message not sent
    debug: false
    # default value `true`
    save_to_db: true

Now you need create the tables in your database:, (*6)

$ php bin/console doctrine:schema:update --dump-sql

or in Symfony2:, (*7)

$ php app/console doctrine:schema:update --dump-sql

This will show SQL queries for creating of tables in the database. You may manually run these queries., (*8)

Note. You may also execute php bin/console doctrine:schema:update --force command, and Doctrine will create needed tables for you. But I strongly recommend you to execute --dump-sql first and check SQL, which Doctrine will execute., (*9)

Use in controller

<?php 

namespace App\YourBundle\Controller;

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

class DefaultController extends Controller
{
    /**
     * @Route("/")
     * @Template()
     */
    public function indexAction()
    {
        .....
        $this->get('avator_turbosms.turbosms')->send("test", "+380XXXXXXXXX");
        .....
    }
}

TODO

  • Translate message
  • Save log to file
  • SonataAdmin

License

symfony-turbosms is released under the BSD 3-Clause License. See the bundled LICENSE.md for details., (*10)

The Versions

18/05 2017

dev-master

9999999-dev https://github.com/AVATOR/symfony-turbosms

Symfony2/3 send sms from Turbosms.ua by SOAP Edit

  Sources   Download

BSD-3-Clause

The Requires

 

by Oleksii Golub

bundle symfony sms symfony turbosms

18/05 2017

1.0

1.0.0.0 https://github.com/AVATOR/symfony-turbosms

Symfony2/3 send sms from Turbosms.ua by SOAP Edit

  Sources   Download

BSD-3-Clause

The Requires

 

by Oleksii Golub

bundle symfony sms symfony turbosms