コード例 #1
0
ファイル: SmsRepository.php プロジェクト: jokamjohn/SMS
 /**
  * @param $recipient
  */
 private function saveSubscription($recipient)
 {
     $result = $this->subscription->subscribe($recipient);
     $subscription = new SubscriptionModel();
     $subscription->number = $recipient;
     $subscription->status = $result->status;
     $subscription->description = $result->description;
     $subscription->save();
     Log::debug($recipient . ' is subscribed');
 }
コード例 #2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     return $this->subscription->subscriptions();
 }