If you need something like laravel native helper url() or asset(), etc.
create file helpers.php in the app directory.
in composer.json you need something like:
"autoload": {
"files": [
"app/helpers.php"
],
"psr-4": {
"App\\": "app/"
}
},
in the file write custom helper function:
if (! function_exists('super_helper')) {
/**
* My custom super helper
*
* @param array $array
* @return array
*/
function super_helper(array $array)
{
return $array;
}
}
in console run
composer dump-autoload
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community