'user', '_resource' => 'transactions', ]; foreach ($this->getAttributes() as $attribute => $value) { switch ($attribute) { case 'user_id': case 'business_id': case 'amount': case 'succeeded': case 'options': case 'created_at': case 'updated_at': $resource[$attribute] = $value; break; } } return $resource; } }