use include laravel controller code example
Example 1: include a file in laravel controller
require_once __DIR__ . '/../app/Utilities/FileName.php';
Example 2: how to put external file in laravel listener class
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
},
"files": [
"app/functions/prices.php"
]
},