Uploaded From CV. Swandhana Server
This commit is contained in:
No files matched your search
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Laravel\Passport;
|
||||
|
||||
trait ResolvesInheritedScopes
|
||||
{
|
||||
/**
|
||||
* Resolve all possible scopes.
|
||||
*
|
||||
* @param string $scope
|
||||
* @return array
|
||||
*/
|
||||
protected function resolveInheritedScopes($scope)
|
||||
{
|
||||
$parts = explode(':', $scope);
|
||||
|
||||
$partsCount = count($parts);
|
||||
|
||||
$scopes = [];
|
||||
|
||||
for ($i = 1; $i <= $partsCount; $i++) {
|
||||
$scopes[] = implode(':', array_slice($parts, 0, $i));
|
||||
}
|
||||
|
||||
return $scopes;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user