Skip to content

Commit da2960b

Browse files
committed
feat: automatically install cors for api projects
1 parent fe441a9 commit da2960b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "leafs/cli",
33
"description": "A simple command line tool for installing and interacting with your leaf apps",
44
"homepage": "https://cli.leafphp.dev",
5-
"version": "v4.2",
5+
"version": "v4.3",
66
"keywords": [
77
"leaf",
88
"php",

src/CreateCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ protected function handle(): int
222222
$extraCommands[] = 'composer require --dev --ansi leafs/alchemy && ./vendor/bin/alchemy install --ansi';
223223
}
224224

225+
if ($this->projectType === 'api') {
226+
$extraCommands[] = 'composer require leafs/cors --ansi';
227+
}
228+
225229
$this->write("\n");
226230

227231
if ($extraOptions['docker']) {

0 commit comments

Comments
 (0)