I am using Laravel 5.2, I am using a helper function just in 1 controller, where should I put such function
/**
* trim all elements of array
*
* @param $elements
* @param string $delimiter
* @return array
*/
private function trimArrayElements($elements, $delimiter = '|')
{
return array_map('trim',explode($delimiter, $elements));
}
via Haider Ali