Example Use | Laravel 5: Ensuring a Value is an Array With wrap
In the introduction of this section, we saw this example code: 1 function checkDomains ( $ domains ) { 2 if ( ! is_array ( $ domains ) ) { 3 $ domains = ( array ) $ domains ; 4 } 5 6 foreach ( $ domains as $ domain ) { 7 // Perform some operation...