Viewing file: GatewayPrefillSeeder.php (17.55 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace Database\Seeders;
use App\Models\GatewayPrefill; use Illuminate\Database\Seeder; use Illuminate\Support\Str;
class GatewayPrefillSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { GatewayPrefill::truncate();
$data=[ [ 'name'=>'Twilio', 'description'=>get_gateway_description('twilio'), 'weblink'=>json_encode(['method'=>'post','url'=>'https://api.twilio.com/2010-04-01/Accounts/{tw_sid}/Messages']), // {} means replace 'message_key'=>'Body', 'to_mobile_key'=>'To', 'from_mobile_key'=>'From', 'mms_mobile_key'=>'mediaUrl', 'headers'=>json_encode(['Authorization'=>'Basic [base64_encode({tw_sid}:{tw_token})]']), //[] means execute 'others'=>'', 'inputs'=>json_encode(servers_fields('twilio')), 'created_at'=>now(), 'updated_at'=>now() ], [ 'name'=>'Vonage', 'description'=>get_gateway_description('vonage'), 'weblink'=>json_encode(['method'=>'post','url'=>'https://rest.nexmo.com/sms/json']), // {} means replace 'message_key'=>'text', 'to_mobile_key'=>'to', 'from_mobile_key'=>'from', 'mms_mobile_key'=>null, 'headers'=>json_encode([]), //[] means execute 'others'=>json_encode(['api_key'=>'{vg_api_key}','api_secret'=>'{vg_api_secret}']), 'inputs'=>json_encode(servers_fields('vonage')), 'created_at'=>now(), 'updated_at'=>now() ], [ 'name'=>'NRS', 'description'=>get_gateway_description('nrs'), 'weblink'=>json_encode(['method'=>'post','url'=>'https://dashboard.360nrs.com/api/rest/sms']), // {} means replace 'message_key'=>'message', 'to_mobile_key'=>'to', 'from_mobile_key'=>'from', 'mms_mobile_key'=>null, 'headers'=>json_encode(['Authorization'=>'Basic {nrs_auth_token}','Content-Type'=>'application/json']), //[] means execute 'others'=>json_encode([]), 'inputs'=>json_encode(servers_fields('nrs')), 'created_at'=>now(), 'updated_at'=>now() ], [ 'name' => 'MessageBird', 'description' => get_gateway_description('message_bird'), 'weblink' => json_encode(['method' => 'post', 'url' => 'https://rest.messagebird.com/messages']), // {} means replace 'message_key' => 'body', 'to_mobile_key' => 'recipients', 'from_mobile_key' => 'originator', 'mms_mobile_key' => null, 'headers' => json_encode(['Authorization' => 'AccessKey {message_bird_auth_token}']), //[] means execute 'others' => json_encode(['shortcode' => '1008']), 'inputs' => json_encode(servers_fields('message_bird')), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'InfoBip', 'description' => get_gateway_description('infobip'), 'weblink' => json_encode(['method' => 'post', 'url' => 'https://lzz25w.api.infobip.com/sms/2/text/advanced']), // {} means replace 'message_key' => 'text', 'to_mobile_key' => 'destinations[]', 'from_mobile_key' => 'from', 'mms_mobile_key' => null, 'headers' => json_encode(['Authorization' => '{infobip_api_key}']), //[] means execute 'others' => json_encode([]), 'inputs' => json_encode(servers_fields('infobip')), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'Broadcaster Mobile', 'description' => get_gateway_description('broadcaster_mobile'), 'weblink' => json_encode(['method' => 'post', 'url' => '{broadcaster_mobile_url}']), // {} means replace 'message_key' => 'message', 'to_mobile_key' => 'msisdns', 'from_mobile_key' => 'dial', 'mms_mobile_key' => null, 'headers' => json_encode(['Content-Type' => 'application/json','Authorization' => '{broadcaster_mobile_auth_token}']), //[] means execute 'others' => json_encode(['apikey'=>'{broadcaster_mobile_api_key}','country'=>'{broadcaster_mobile_country}','tag'=>'{broadcaster_mobile_tag}']), 'inputs' => json_encode(servers_fields('broadcaster_mobile')), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'Bulksmsbd', 'description' => get_gateway_description('bulksmsbd'), 'weblink' => json_encode(['method' => 'post', 'url' => '{bulksmsbd_url}']), // {} means replace 'message_key' => 'message', 'to_mobile_key' => 'number', 'from_mobile_key' => 'bulksms_from', 'mms_mobile_key' => null, 'headers' => json_encode([]), //[] means execute 'others' => json_encode(['username'=>'{bulksmsbd_username}','password'=>'{bulksmsbd_password}']), 'inputs' => json_encode(servers_fields('bulksmsbd')), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'Clickatel', 'description' => get_gateway_description('clickatel'), 'weblink' => json_encode(['method' => 'get', 'url' => '{clickatel_url}']), // {} means replace 'message_key' => 'content', 'to_mobile_key' => 'to', 'from_mobile_key' => 'from', 'mms_mobile_key' => null, 'headers' => json_encode([]), //[] means execute 'others' => json_encode(['apiKey'=>'{clickatel_api_key}','clientMessageId'=> Str::random(2)]), 'inputs' => json_encode(servers_fields('clickatel')), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'Click Send', 'description' => get_gateway_description('click_send'), 'weblink' => json_encode(['method' => 'post', 'url' => 'https://api-mapper.clicksend.com/http/v2/send.php']), // {} means replace 'message_key' => 'message', 'to_mobile_key' => 'to', 'from_mobile_key' => 'senderId', 'mms_mobile_key' => null, 'headers' => json_encode(['Content-Type'=>'application/x-www-form-urlencoded']), //[] means execute 'others' => json_encode(['username'=>'{click_send_username}','key'=> '{click_send_password}','method'=>'http']), 'inputs' => json_encode(servers_fields('click_send')), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'Easysendsms', 'description' => get_gateway_description('easysendsms'), 'weblink' => json_encode(['method' => 'get', 'url' => 'https://www.easysendsms.com/sms/bulksms-api/bulksms-api']), // {} means replace 'message_key' => 'text', 'to_mobile_key' => 'to', 'from_mobile_key' => 'from', 'mms_mobile_key' => null, 'headers' => json_encode([]), //[] means execute 'others' => json_encode(['username'=>'{easysendsms_username}','password'=> '{easysendsms_password}','type'=>'0']), 'inputs' => json_encode(servers_fields('easysendsms')), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'EstoreSMS', 'description' => get_gateway_description('estoresms'), 'weblink' => json_encode(['method' => 'get', 'url' => 'http://www.estoresms.com/smsapi.php']), // {} means replace 'message_key' => 'message', 'to_mobile_key' => 'recipient', 'from_mobile_key' => 'sender', 'mms_mobile_key' => null, 'headers' => json_encode([]), //[] means execute 'others' => json_encode(['api_key'=>'{estoresms_username}','password'=> '{estoresms_password}}']), 'inputs' => json_encode(servers_fields('estoresms')), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'GreenWebBD', 'description' => get_gateway_description('greenWebBD'), 'weblink' => json_encode(['method' => 'get', 'url' => '{greenWebBD_url}}']), // {} means replace 'message_key' => 'message', 'to_mobile_key' => 'to', 'from_mobile_key' => 'green_web_frm', 'mms_mobile_key' => null, 'headers' => json_encode([]), //[] means execute 'others' => json_encode(['token'=>'{greenWebBD_api_key}']), 'inputs' => json_encode(servers_fields('greenWebBD')), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'Ones TwoU', 'description' => get_gateway_description('ones_two_u'), 'weblink' => json_encode(['method' => 'get', 'url' => 'https://api.1s2u.io/bulksms']), // {} means replace 'message_key' => 'msg', 'to_mobile_key' => 'mno', 'from_mobile_key' => 'ones_two_u_from', 'mms_mobile_key' => null, 'headers' => json_encode([]), //[] means execute 'others' => json_encode(['username'=>'{ones_two_u_username}','password'=>'ones_two_u_password','mt'=>'0','fl'=>'0','Sid'=>'test']), 'inputs' => json_encode(servers_fields('ones_two_u')), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'Rute Mobile', 'description' => get_gateway_description('route_mobile'), 'weblink' => json_encode(['method' => 'get', 'url' => '{route_mobile_url}']), // {} means replace 'message_key' => 'message', 'to_mobile_key' => 'destination', 'from_mobile_key' => 'source', 'mms_mobile_key' => null, 'headers' => json_encode([]), //[] means execute 'others' => json_encode(['username'=>'{route_mobile_username}','password'=>'{route_mobile_password}','type'=>'0','dlr'=>'1']), 'inputs' => json_encode(servers_fields('route_mobile' )), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'Text Local', 'description' => get_gateway_description('text_local'), 'weblink' => json_encode(['method' => 'get', 'url' => '{text_local_url}']), // {} means replace 'message_key' => 'message', 'to_mobile_key' => 'numbers', 'from_mobile_key' => 'sender', 'mms_mobile_key' => null, 'headers' => json_encode([]), //[] means execute 'others' => json_encode(['apikey'=>'{text_local_api_key}']), 'inputs' => json_encode(servers_fields('text_local' )), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'ThinQ', 'description' => get_gateway_description('thinq'), 'weblink' => json_encode(['method' => 'post', 'url' => 'https://api.thinq.com/account/{thinq_account_id}/product/origination/sms/send']), // {} means replace 'message_key' => 'message', 'to_mobile_key' => 'to_did', 'from_mobile_key' => 'from_did', 'mms_mobile_key' => 'file', 'headers' => json_encode(['Authorization'=>'Basic [base64_encode({thinq_username}:{thinq_auth_token})]']), //[] means execute 'others' => json_encode(['thinq_account_id'=>'{thinq_account_id}','thinq_username'=>'{thinq_username}','thinq_auth_token'=>'{thinq_auth_token}']), 'inputs' => json_encode(servers_fields('thinq' )), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'TynTec', 'description' => get_gateway_description('tyntec'), 'weblink' => json_encode(['method' => 'post', 'url' => '{tyntec_url}']), // {} means replace 'message_key' => 'message', 'to_mobile_key' => 'to', 'from_mobile_key' => 'from', 'mms_mobile_key' => null, 'headers' => json_encode(['apikey'=>'{tyntec_apikey}','Accept' => 'application/json','Content-Type' => 'application/json']), //[] means execute 'others' => json_encode([]), 'inputs' => json_encode(servers_fields('tyntec' )), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'ZamtelCoZm', 'description' => get_gateway_description('zamtelCoZm'), 'weblink' => json_encode(['method' => 'post', 'url' => '{zamtelCoZm_url}']), // {} means replace 'message_key' => 'message', 'to_mobile_key' => 'contacts', 'from_mobile_key' => 'senderid', 'mms_mobile_key' => null, 'headers' => json_encode([]), //[] means execute 'others' => json_encode(['key'=>'{zamtelCoZm_api_key}']), 'inputs' => json_encode(servers_fields('zamtelCoZm' )), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'Africastalking', 'description' => get_gateway_description('africastalking'), 'weblink' => json_encode(['method' => 'post', 'url' => '{zamtelCoZm_url}']), // {} means replace 'message_key' => 'message', 'to_mobile_key' => 'to', 'from_mobile_key' => 'from', 'mms_mobile_key' => null, 'headers' => json_encode(['apiKey'=>'{africas_talking_username}','Accept'=>'application/json','Content-Type'=>'application/x-www-form-urlencoded']), //[] means execute 'others' => json_encode(['africas_talking_username'=>'{africas_talking_username}','africas_talking_api_key'=>'{africas_talking_api_key}']), 'inputs' => json_encode(servers_fields('africastalking' )), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'Signalwire', 'description' => get_gateway_description('signalwire'), 'weblink' => json_encode(['method' => 'post', 'url' => '{sw_space_url}/api/laml/2010-04-01/Accounts/{sw_project_id}/Messages.json']), // {} means replace 'message_key' => 'Body', 'to_mobile_key' => 'To', 'from_mobile_key' => 'From', 'mms_mobile_key' => 'mediaUrl', 'headers' => json_encode(['Authorization'=>'Basic [base64_encode({sw_project_id}:{sw_token})]']), //[] means execute 'others' => json_encode(['sw_project_id'=>'{sw_project_id}','sw_space_url'=>'{sw_space_url}','sw_token'=>'{sw_token}']), 'inputs' => json_encode(servers_fields('signalwire' )), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'Bandwidth', 'description' => get_gateway_description('bandwidth'), 'weblink' => json_encode(['method' => 'post', 'url' => '{bandwidth_url}']), // {} means replace 'message_key' => 'text', 'to_mobile_key' => 'to', 'from_mobile_key' => 'from', 'mms_mobile_key' => null, 'headers' => json_encode(['Authorization'=>'Basic [base64_encode({bandwidth_auth_token}:{bandwidth_api_secret})]']), //[] means execute 'others' => json_encode(['bandwidth_auth_token'=>'{bandwidth_auth_token}','bandwidth_api_secret'=>'{bandwidth_api_secret}','applicationId'=>'{bandwidth_app_id}']), 'inputs' => json_encode(servers_fields('bandwidth' )), 'created_at' => now(), 'updated_at' => now() ], [ 'name' => 'Smpp', 'description' => get_gateway_description('smpp'), 'weblink' => json_encode(['method' => 'post', 'url' => '{smpp_ip_address}']), // {} means replace 'message_key' => 'text', 'to_mobile_key' => 'to', 'from_mobile_key' => 'from', 'mms_mobile_key' => null, 'headers' => json_encode([]), //[] means execute 'others' => json_encode(['smpp_username'=>'{smpp_username}','smpp_password'=>'{smpp_password}','smpp_port'=>'{smpp_port}']), 'inputs' => json_encode(servers_fields('smpp' )), 'created_at' => now(), 'updated_at' => now() ] ];
GatewayPrefill::insert($data); } }
|