Skip to content

Commit 158e39f

Browse files
committed
strip install
1 parent 0049fdf commit 158e39f

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mastashake08/laravel-openai-api",
33
"description": "Add an OpenAI API easily into your projects.",
4-
"version": "1.1.0",
4+
"version": "1.2.0",
55
"keywords": [
66
"mastashake08",
77
"laravel",

src/LaravelOpenaiApiServiceProvider.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,18 @@ public function configurePackage(Package $package): void
1818
$package
1919
->name('laravel-openai-api')
2020
->hasConfigFile(['openai'])
21-
->hasViews()
2221
->hasRoute('api')
23-
->publishesServiceProvider('OpenAI\Laravel\ServiceProvider')
22+
->publishesServiceProvider('Mastashake\LaravelOpenaiApi\LaravelOpenaiApiServiceProvider')
2423
->hasMigration('create_laravel-openai-api_table')
25-
->hasCommand(LaravelOpenaiApiCommand::class);
24+
->hasCommand(LaravelOpenaiApiCommand::class)
25+
->hasInstallCommand(function(InstallCommand $command) {
26+
$command
27+
->publishConfigFile()
28+
->publishMigrations()
29+
->askToRunMigrations()
30+
->copyAndRegisterServiceProviderInApp()
31+
->askToStarRepoOnGitHub('mastashake08/laravel-openai-api');
32+
}
33+
);
2634
}
2735
}

0 commit comments

Comments
 (0)