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

Set the type of data returned by the functions #41

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

devcodemarcos
Copy link

When using the command "php artisan rest:quick-start" a file called "UserResource.php" will be generated, it does not have the return type in its functions and it sends me an error of the type:

{
    "message": "Declaration of App\\Rest\\Resources\\User::relations(Lomkit\\Rest\\Http\\Requests\\RestRequest $request) must be compatible with Lomkit\\Rest\\Http\\Resource::relations(Lomkit\\Rest\\Http\\Requests\\RestRequest $request): array",
    "exception": "Symfony\\Component\\ErrorHandler\\Error\\FatalError",
    "file": "/var/www/html/app/Rest/Resources/UserResource.php",
    "line": 35,
    "trace": []
}

@GautierDele
Copy link
Member

Thanks @devcodemarcos 😄, merging !

@GautierDele GautierDele merged commit c8cc01a into Lomkit:master Sep 14, 2023
18 checks passed
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

Successfully merging this pull request may close these issues.

2 participants