File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -32,4 +32,14 @@ $app->register(Leaf\Console\ViewBuildCommand::class);
3232$ app ->register (Leaf \Console \ViewInstallCommand::class);
3333$ app ->register (Leaf \Console \DeployCommand::class);
3434
35+ $ app ->on ('command.notFound ' , function ($ event ) use ($ app ) {
36+ $ command = $ event ->getCommandName ();
37+
38+ if (\Leaf \FS \File::exists (getcwd () . "/leaf " )) {
39+ $ exitCode = (int ) sprout ()->run ("php leaf $ command " , null );
40+ $ event ->setExitCode ($ exitCode );
41+ $ event ->stopPropagation ();
42+ }
43+ });
44+
3545$ app ->run ();
Original file line number Diff line number Diff line change 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.5.2 " ,
5+ "version" : " v4.6.0 " ,
66 "keywords" : [
77 " leaf" ,
88 " php" ,
You can’t perform that action at this time.
0 commit comments