diff --git a/database/factories/PassportClientFactory.php b/database/factories/PassportClientFactory.php new file mode 100644 index 000000000..63e64864b --- /dev/null +++ b/database/factories/PassportClientFactory.php @@ -0,0 +1,19 @@ +define(Client::class, function (Faker $faker) { + return [ + 'user_id' => null, + 'name' => $faker->company, + 'secret' => Str::random(40), + 'redirect' => $faker->url, + 'personal_access_client' => 0, + 'password_client' => 0, + 'revoked' => 0, + ]; +}); diff --git a/src/PassportServiceProvider.php b/src/PassportServiceProvider.php index 44fe0f208..063984a18 100644 --- a/src/PassportServiceProvider.php +++ b/src/PassportServiceProvider.php @@ -51,6 +51,10 @@ 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->commands([ Console\InstallCommand::class, Console\ClientCommand::class,