diff --git a/composer.json b/composer.json index 9d3d1cde7..e04b5259c 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/src/Client.php b/src/Client.php index 9fbc155bd..f75fb7b97 100644 --- a/src/Client.php +++ b/src/Client.php @@ -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. * @@ -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(); + } } diff --git a/src/PassportServiceProvider.php b/src/PassportServiceProvider.php index 6c6d97439..e5082048b 100644 --- a/src/PassportServiceProvider.php +++ b/src/PassportServiceProvider.php @@ -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');