https://laravel.com/docs/5.6/helpers
So how do we customize our own helper in Laravel? It's actually quite simple..
Just add files in autoload in composer.json.
"autoload": {
"files": [
"app/ow_source/_functions.php"
],
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/",
"Ow\\": "app/ow_source/class",
"Ow\\Model\\": "app/ow_source/model"
}
},
In this way, we can call our function anytime and anywhere.
No Comment
Post your comment