createCashierModel($billableModel); if ($result = $model->where($model->getStripeIdName(), $stripeId)->first()) { return $result; } } } /** * Create a new instance of the Auth model. * * @param string $class * @return \Laravel\Cashier\Contracts\Billable */ protected function createCashierModel($class) { $model = new $class; if (! $model instanceof BillableContract) { throw new \InvalidArgumentException('Model does not implement Billable.'); } return $model; } }