-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f44d1ea
commit 6bf2ed1
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Botble\Api\Commands; | ||
|
||
use Botble\Setting\Facades\Setting; | ||
use Illuminate\Console\Command; | ||
use Symfony\Component\Console\Attribute\AsCommand; | ||
|
||
#[AsCommand('cms:api:generate-docs', 'Generate API documentation from your API routes.')] | ||
class GenerateDocumentationCommand extends Command | ||
{ | ||
public function handle(): int | ||
{ | ||
Setting::forceSet('api_enabled', true)->save(); | ||
|
||
$this->call('scribe:generate', [ | ||
'--force' => true, | ||
]); | ||
|
||
return self::SUCCESS; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters