I\'ve created a library
folder within the app
folder to add my own classes.
This is the content of the file app/library/helper.p
I know this question was answered a while ago, but the reason it isn't working is that you need to give the namespace that corresponds with the file structure. Therefore, since the Library class is inside the App folder you need:
namespace App\Library;
class MyHelper{
public function v($arr){
var_dump($arr);
}
}
Additionally, if you are going to call the class MyHelper
, you need to call the file MyHelper.php