I use Laravel framework and this is my current directory:
As you see, there is a class named Log
(the one I've selected). Now I need to make it global. I mean I want to make it accessible in everywhere and be able to I make a object (instance) of it in following files:
- All files of
classe
folder - All controller
web.php
file of- All file of views
Anyway I want to be able to make a instande of it and call its methods everywhere like this:
$obj = new Log();
$obj->insert($message);
How can I do that?