X7ROOT File Manager
Current Path:
/home/gfecatvj/sites/realesbar/vendor/laravel/passport/src
home
/
gfecatvj
/
sites
/
realesbar
/
vendor
/
laravel
/
passport
/
src
/
📁
..
📄
ApiTokenCookieFactory.php
(2.07 KB)
📄
AuthCode.php
(1.49 KB)
📁
Bridge
📄
Client.php
(4.08 KB)
📄
ClientRepository.php
(5.52 KB)
📁
Console
📁
Events
📁
Exceptions
📁
Guards
📄
HasApiTokens.php
(1.88 KB)
📁
Http
📄
Passport.php
(15.63 KB)
📄
PassportServiceProvider.php
(8.96 KB)
📄
PassportUserProvider.php
(1.81 KB)
📄
PersonalAccessClient.php
(868 B)
📄
PersonalAccessTokenFactory.php
(3.62 KB)
📄
PersonalAccessTokenResult.php
(1.15 KB)
📄
RefreshToken.php
(1.85 KB)
📄
RefreshTokenRepository.php
(1.6 KB)
📄
RouteRegistrar.php
(4.63 KB)
📄
Scope.php
(1.08 KB)
📄
Token.php
(3.38 KB)
📄
TokenRepository.php
(2.93 KB)
📄
TransientToken.php
(610 B)
Editing: HasApiTokens.php
<?php namespace Laravel\Passport; use Illuminate\Container\Container; trait HasApiTokens { /** * The current access token for the authentication user. * * @var \Laravel\Passport\Token */ protected $accessToken; /** * Get all of the user's registered OAuth clients. * * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function clients() { return $this->hasMany(Passport::clientModel(), 'user_id'); } /** * Get all of the access tokens for the user. * * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function tokens() { return $this->hasMany(Passport::tokenModel(), 'user_id')->orderBy('created_at', 'desc'); } /** * Get the current access token being used by the user. * * @return \Laravel\Passport\Token|null */ public function token() { return $this->accessToken; } /** * Determine if the current API token has a given scope. * * @param string $scope * @return bool */ public function tokenCan($scope) { return $this->accessToken ? $this->accessToken->can($scope) : false; } /** * Create a new personal access token for the user. * * @param string $name * @param array $scopes * @return \Laravel\Passport\PersonalAccessTokenResult */ public function createToken($name, array $scopes = []) { return Container::getInstance()->make(PersonalAccessTokenFactory::class)->make( $this->getKey(), $name, $scopes ); } /** * Set the current access token for the user. * * @param \Laravel\Passport\Token $accessToken * @return $this */ public function withAccessToken($accessToken) { $this->accessToken = $accessToken; return $this; } }
Upload File
Create Folder