/** * @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'); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { return $this->subscription->subscriptions(); }