Skip to content

TempleSuite/sms-yii2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

#####Version 1.0

Dependencies

Installation

The recommended method for installing sms-yii2 is via Composer. This will also install the dependencies automatically. To be able to install this package, you need to tell your project's composer.json to search this repository. To do that, add the following to your composer.json file.

"repositories": [
    {
        "type": "vcs",
        "url": "[email protected]:TempleSuite/sms-yii2.git"
    }
],

Then you can run the following command: composer require maissoftware/sms-yii2 "@dev"
* NOTE: If you do not have access to this private package with the use of an SSH key, the installation will fail.

Configuration

  • Add the module to your project config file. For example, "project/frontend/config/main.php"
'sms' => [
    'class' => 'maissoftware\sms\SMS', //Path to module
    'phoneColumn' => 'phone_number', //The name of your phone column in the user table in database
    'phoneTable' => 'phone_number', //Used if phone numbers are stored in a different table in database
    'phoneUserIdColumn' => 'entity_id', //The name of the user id column in the phone table
],
  • Use the create view to add your Twilio account information to your database
  • The Grid module dependency also needs to be added to your configuration file if it is not already there.
'gridview'=> [
    'class' => '\kartik\grid\Module'
],
  • make sure you also run the migrations to create the required tables.
    • Migration will only work if you have a "user" table with the id column "id"

Releases

No releases published

Packages

No packages published

Languages