Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start using application #121

Closed
ponasromas opened this issue Feb 23, 2022 · 4 comments
Closed

Unable to start using application #121

ponasromas opened this issue Feb 23, 2022 · 4 comments

Comments

@ponasromas
Copy link

After fresh installation via composer leaf is not working. Using example code:

<?php

require __DIR__ . "/vendor/autoload.php";

app()->get("/", function () {
  response()->json(["message" => "Hello World!"]);
});

app()->run();

Getting:

PHP Fatal error: Uncaught Error: Call to undefined function app()

Paths are correct. Application just does not work. Using latest version: 3.0 RC2.

P.S. Does the phpmailer should exist by default in 'vendor' directory if I did not install 'mail' module?

@mychidarko
Copy link
Member

phpmailer is only required if you install the mail module

@mychidarko
Copy link
Member

Also, did you install through composer or GitHub?

@ponasromas
Copy link
Author

Yea... Project is very immature. Voided.

@mychidarko
Copy link
Member

If you install through GitHub, the helpers aren't auto loaded for you, you'll need to link to the helpers file manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants