Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
"php": "^7.3",
"ext-json": "*",
"firebase/php-jwt": "^5.0",
"illuminate/auth": "^8.0",
"illuminate/console": "^8.0",
"illuminate/container": "^8.0",
"illuminate/contracts": "^8.0",
"illuminate/cookie": "^8.0",
"illuminate/database": "^8.0",
"illuminate/encryption": "^8.0",
"illuminate/http": "^8.0",
"illuminate/support": "^8.0",
"illuminate/auth": "^8.2",
"illuminate/console": "^8.2",
"illuminate/container": "^8.2",
"illuminate/contracts": "^8.2",
"illuminate/cookie": "^8.2",
"illuminate/database": "^8.2",
"illuminate/encryption": "^8.2",
"illuminate/http": "^8.2",
"illuminate/support": "^8.2",
"league/oauth2-server": "^8.1",
"nyholm/psr7": "^1.3",
"phpseclib/phpseclib": "^2.0",
Expand Down
14 changes: 14 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

namespace Laravel\Passport;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
use Laravel\Passport\Database\Factories\ClientFactory;

class Client extends Model
{
use HasFactory;

/**
* The database table used by the model.
*
Expand Down Expand Up @@ -189,4 +193,14 @@ public function getConnectionName()
{
return config('passport.storage.database.connection') ?? $this->connection;
}

/**
* Create a new factory instance for the model.
*
* @return \Illuminate\Database\Eloquent\Factories\Factory
*/
public static function newFactory()
{
return ClientFactory::new();
}
}
4 changes: 0 additions & 4 deletions src/PassportServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ public function boot()
__DIR__.'/../resources/js/components' => base_path('resources/js/components/passport'),
], 'passport-components');

$this->publishes([
__DIR__.'/../database/factories' => database_path('factories'),
], 'passport-factories');

$this->publishes([
__DIR__.'/../config/passport.php' => config_path('passport.php'),
], 'passport-config');
Expand Down