Closed efriandika closed 4 years ago
RB
is not a real class. It does not exist. It's an alias so you need to have it created with use
as documented:
use MarcinOrlowski\ResponseBuilder\ResponseBuilder as RB;
or use ResponseBuilder
instead of RB
.
I'll improve docs to make it more clear.
Thanks for the explanation,
The solution you gave is possible if I move ResponseBuilderServiceProvider
to my Providers directory,
But if I only use autodiscover (ResponseBuilderServiceProvider
from the package) it still produce the errors. Since I cannot see RB alias definition in laravel-api-response-builder/src/ResponseBuilderServiceProvider.php
PS: I am sorry if my english is bad.. I am beginner in english :D
Can you test this and tell if that solves the problem -> in your project's vendor/MarcinOrlowski/laravel-api-response-builder
folder create RB.php
file with the following content:
<?php
namespace MarcinOrlowski\ResponseBuilder;
class RB extends ResponseBuilder
{
}
then do composer dumpautoload
and check if references to RB::
work without aliases. Let me know
Hi I have made a pull request to solve this issue
I corrected Provider to not use RB
alias. Adding use
defates the purpose of using RB
as it was mainly to short the files and provider refers ResponseBuilder
only once. Thanks for the report. v9.0.1 is out now.
What's wrong?
Steps to reproduce the behavior: