-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
3 changed files
with
40 additions
and
1 deletion.
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,38 @@ | ||
<?php | ||
namespace NexaMerchant\Apis\Console\Commands; | ||
use Illuminate\Support\Facades\Artisan; | ||
|
||
use Nicelizhi\Apps\Console\Commands\CommandInterface; | ||
|
||
class GenerateApiDocs extends CommandInterface | ||
|
||
{ | ||
protected $signature = 'Apis:gendocs'; | ||
|
||
protected $description = 'Generate l5-swagger docs (Admin & Shop).'; | ||
|
||
public function getAppVer() { | ||
return config("Apis.ver"); | ||
} | ||
|
||
public function getAppName() { | ||
return config("Apis.name"); | ||
} | ||
|
||
public function handle() | ||
{ | ||
$this->info("Install app: Apis"); | ||
if (!$this->confirm('Do you wish to continue?')) { | ||
// ... | ||
$this->error("App Apis Install cannelled"); | ||
return false; | ||
} | ||
|
||
$this->warn('Step: Generate l5-swagger docs (Admin & Shop)...'); | ||
$result = shell_exec('php artisan l5-swagger:generate --all'); | ||
$this->info($result); | ||
|
||
$this->comment('-----------------------------'); | ||
$this->comment('Success: NexaMerchant REST API has been configured successfully.'); | ||
} | ||
} |
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
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