Skip to content

Parameter $columns can be a string, and must be converted to expected array #281

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

Closed
wants to merge 1 commit into from

Conversation

jayprakashji
Copy link

With Eloquent you can do both of these:
Model::where('id', $id)->get(['column'])
Model::where('id', $id)->get('column')

Builder is converting it.
https://github.com/laravel/framework/blob/5.8/src/Illuminate/Database/Query/Builder.php#L2117

But makeCacheKey() is expecting array.

I took the same approach that laravel has, into makeCacheKey().

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.6%) to 93.091% when pulling 14dcb6b on jayprakashji:master into 536316a on GeneaLabs:master.

@mikebronner
Copy link
Owner

Thanks for submitting this. I will take a look, probably later today. :)

@mikebronner mikebronner self-assigned this Aug 27, 2019
@mikebronner
Copy link
Owner

@jayprakashji I went ahead and fixed this as the root of the cause, instead of updating the makeCacheKey() method and added a test case for it. Thanks again!

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.

3 participants