-
Notifications
You must be signed in to change notification settings - Fork 109
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
Is the by-resource option functional? #169
Comments
Correction: I was able to determine that the class names should be the same as the underlying model, so the only problem is that the generator does not set the correct class name when using |
Hi! This should be working so thanks for reporting. I'll look into it shortly. What version are you using? |
Quick note: tested on the |
ok, I am on |
@lindyhopchris are you sure it's working on When using The correct file names are generated but the underlying class names are incorrect (Adapters/User.php houses 'Adapter' class instead of 'User') |
Ah, ok I might have misinterpreted what you meant! I thought you meant the file name was wrong rather than the class name. I'll double check (will be tomorrow) and fix. As a side note, it hasn't been a waste of time upgrading to the alpha.1 branch as I'll be tagging that early next week. |
That's awesome! I really like the changes you made for 1.0, keep up the good work! |
When generating a file when the `by-resource` option was set to false, the wrong class name was used in the generated file. This commit adds tests and the fix. Fixes #169
Thanks for reporting, I don't think this has ever worked but it is now and is tested. It does create the problem that there's an |
I'm trying to generate my resources via artisan with the by-resource option set to false but it is creating the same class names in the same namespaces and throws an exception. I would think it would be expecting the class name to be the same as the underlying model but wanted to be sure (i.e. User model => User adapter).
I went looking in the code to determine what class names would be expected but couldn't find any places that use that option other than the artisan generators.
The text was updated successfully, but these errors were encountered: