承接 avator/symfony-turbosms 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

avator/symfony-turbosms

Composer 安装命令:

composer require avator/symfony-turbosms

包简介

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

README 文档

README

This bundle helps you to send sms in Symfony2/3 project.

Installation

Composer

Download LexxpavlovSettingsBundle and its dependencies to the vendor directory.

You can use Composer for the automated process:

$ composer require avator/symfony-turbosms

or manually add link to bundle into your composer.json and run $ composer update:

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

Composer will install bundle to vendor/avator/symfony-turbosms directory.

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:

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

or in Symfony2:

$ 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.

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.

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.

统计信息

  • 总下载量: 162
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2017-05-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固