-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Is your feature request related to a problem? Please describe.
Let's say that I had a table with 20 columns. The Model::byHash($hash)
is getting all 20 columns by default, and hide columns from $hidden
attribute. I often face a scenario where I need to get only 1 or 2 column for a table via Model::byHash($hash)
.
It's currently achievable with: Model::select('id', 'email')->byHash($hash)->first();
. Two problems here:
- Loss of type-safety.
- Loss of conciseness, we can make it better.
Describe the solution you'd like
Capability to use Model::byHash($hash, $columns)
, Model::byHashOrFail($hash, $columns)
Metadata
Metadata
Assignees
Labels
No labels