/**
  * booting the service
  */
 public function boot()
 {
     $this->package('ipunkt/subscriptions');
     /** @var \Illuminate\Config\Repository $config */
     $config = $this->app['config'];
     $this->app->bind('Ipunkt\\Subscriptions\\Plans\\PlanRepository', function () use($config) {
         $repository = new PlanRepository($config->get('subscriptions::plans'));
         $repository->setDefaultPlan($config->get('subscriptions::defaults.plan'));
         return $repository;
     });
 }
 /**
  * tries to find a plan
  *
  * @param string $plan
  *
  * @return Plan|null
  */
 public function findPlan($plan)
 {
     return $this->planRepository->find($plan);
 }