array_map
or array_filter
. You have to cast the object to an array before you can use it with those functions.tap
and the higher order tap
?tap
allows you to pass in an object as the first parameter and a callable, like an anonymous function, as the second parameter.tap
here. PR for higher order tap here
down
method in migrations is useless, specially in production, which can be dangerousdown
is optional in 5.5db:freash
command which drops all the tables and reruns all of the migrations. This way you do not need to write any down
methods, which might save some timeThank you, Marcel Pociot for your work on @botman_io. A $50 Amazon gift card from Zend Training is on its way to you.
Professional Training for Professional PHP developers
Thank you Chris Thomas for authoring the show notes for this episode!
If you'd like to contribute show notes and totally get credit for it, check out the show-notes repo!