Skip to content

Commit affee38

Browse files
committed
feat: apiStope method added to request
1 parent 580900d commit affee38

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/ServiceProvider.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ protected function addRequestMacros(): void
108108
]);
109109
});
110110

111+
Request::macro('apiScope', function (string $scope, ?string $value = null) {
112+
/** @var Request $this */
113+
return $this->merge([
114+
$scope => $value,
115+
]);
116+
});
117+
111118
Request::macro('apiAddFields', function (string|array $fieldsOrAttributes) {
112119
/** @var Request $this */
113120

0 commit comments

Comments
 (0)