scramble
scramble copied to clipboard
Guess models of JSON resources from a parameter passed to the resource's `$resource` property
Maybe easier to implement after https://github.com/dedoc/scramble/issues/132
Right now, to get proper types in JsonResource, Scramble will either check App\Models\* ns, or will require user to manually specify a type of a model this resource represents.
This is fine, but feels like it would be a nice DX improvement if Scramble automatically guessed a model for resource based on a type of parameter passed to the resource. If this guessing is not correct, users can always opt-out and specify model manually.