Laraship

⌘K
  1. Home
  2. Docs
  3. Laraship
  4. Subscriptions Module
  5. Usage Manager

Usage Manager

Subscription Cycles and Plan Usage are Reports to display how much the user has consumed from his features, for example: how many SMS were sent, how many products were created, and so on.

and you can use the Plan usage for other actions that are not related to a specific model. for example how many SMS messages are sent.

 

 

  • To record a new usage:
UsageManager::recordAUsage($model, $usageDetails, $product = null, $plan = null, $user = null)

 

  • To check if a limit reached or not:
UsageManager::isModelUsageReachedLimit(Service::class)