We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df0b9ad commit 899b52eCopy full SHA for 899b52e
src/CreateCommand.php
@@ -158,6 +158,14 @@ protected function handle(): int
158
159
\Leaf\FS\Directory::delete("$directory/public/index.php");
160
\Leaf\FS\Directory::copy(__DIR__ . '/themes/api/index.php', "$directory/public/index.php");
161
+
162
+ \Leaf\FS\File::write("$directory/leaf", function ($content) {
163
+ return str_replace(
164
+ 'Leaf\Core::loadConsole()',
165
+ "Leaf\Core::mode('api');\nLeaf\Core::loadConsole()",
166
+ $content
167
+ );
168
+ });
169
}
170
171
$this->writeln("\n🚀 Successfully created project <info>" . basename($directory) . "</info>\n");
0 commit comments