Closed nuernbergerA closed 2 years ago
If possible, it'd be nice to see some memoization here as not to run get_class_methods
for every column. This really only needs to be run once for the entire lifecycle (i.e. static
).
@jasonmccreary would it be ok for you to store it in the container?
app()->instance('faker-methods', [])
we could do this in getNamesFromProvider
This isn't part of a Laravel app. So there is not app()
.
You can make the method static
and track a static
variable. Here's a good article if you're not familiar.
@jasonmccreary done
get_class_methods
will return only public accessible method Visibility example from the docs Usage in laravel ecosystem