HosomiKai/kotsms: 簡訊王 - GitHub

文章推薦指數: 80 %
投票人數:10人

設定完成後瀏覽 http://localhost:8000/test/kotsms. 如果你要接收簡訊王發送簡訊後的結果. KOTSMS_RETURN_URL="your url for accepts kotsms request after send sms" ... Skiptocontent {{message}} HosomiKai / kotsms Public Notifications Fork 0 Star 0 簡訊王 0 stars 0 forks Star Notifications Code Issues 0 Pullrequests 0 Actions Projects 0 Wiki Security Insights More Code Issues Pullrequests Actions Projects Wiki Security Insights Thiscommitdoesnotbelongtoanybranchonthisrepository,andmaybelongtoaforkoutsideoftherepository. master Branches Tags Couldnotloadbranches Nothingtoshow {{refName}} default Couldnotloadtags Nothingtoshow {{refName}} default 1 branch 3 tags Code Latestcommit   Gitstats 44 commits Files Permalink Failedtoloadlatestcommitinformation. Type Name Latestcommitmessage Committime config     resources/views     routes     src     .gitignore     .php_cs.dist     README.md     changelog.md     composer.json     Viewcode Kotsms簡訊王非官方Laravel發送簡訊API Requirementforlaravel5.6-8.x PHP>=7 Installation 1.RequirethePackage 2.Setupenv.env Usage 1.發送簡訊 2.查詢點數 3.查詢簡訊發送狀態 Changelog TODO README.md Kotsms簡訊王非官方Laravel發送簡訊API Requirementforlaravel5.6-8.x PHP>=7 Installation ViaComposer 1.RequirethePackage $composerrequirehosomikai/kotsms 2.Setupenv.env KOTSMS_USERNAME="yourusername" KOTSMS_PASSWORD="yourpassword" 如果你想載入demo範例config/app.php 'providers'=>[ ... Hosomikai\Kotsms\KotsmsDemoServiceProvider::class, ] 設定完成後瀏覽http://localhost:8000/test/kotsms 如果你要接收簡訊王發送簡訊後的結果 KOTSMS_RETURN_URL="yoururlforacceptskotsmsrequestaftersendsms" Usage 1.發送簡訊 useKotsms; ... $content='helloworld!';//發送內容 $smsNumber='0911123456';//發送對象手機號碼 $costPoints=Kotsms::countAmount($content);//試算此封簡訊會花費多少點數 //發送簡訊 $response=Kotsms::to($smsNumber) ->content($content) ->send(); $response->isSuccess();//是否成功 $response->getMessage();//回傳成功或錯誤訊息 $response->toArray(); toArray格式: //成功 [ 'value'=>'kmsgid', 'message'=>'成功', 'success'=>true, ]; //失敗 [ 'value'=>'-60002', 'message'=>'您帳戶中的點數不足', 'success'=>false, ]; 2.查詢點數 useKotsms; ... //剩餘點數 $points=Kotsms::queryUserPoints(); 3.查詢簡訊發送狀態 useKotsms; ... $reposnse=Kotsms::queryStatus($kmsgid); if($response->isSuccess()){ //成功 }else{ //失敗 } Changelog Pleaseseethechangelogformoreinformationonwhathaschangedrecently. TODO About 簡訊王 Resources Readme Stars 0 stars Watchers 1 watching Forks 0 forks Releases 2 1.1.1 Latest Jun5,2021 +1release Packages0 Nopackagespublished Languages PHP 81.3% Blade 18.7% Youcan’tperformthatactionatthistime. Yousignedinwithanothertaborwindow.Reloadtorefreshyoursession. Yousignedoutinanothertaborwindow.Reloadtorefreshyoursession.



請為這篇文章評分?