hi all. I am getting "Class Not Found" errors when using a lookup table like this:
use App\Repositories\StatusSleeper;
$events = [
1 => 'StatusSleeper'
]
I'm trying to get my method to return a Class. When I hardcode the name of the class it works:
return (new StatusSleeper);
// Works
But when I try to make it dynamic based on the lookup tables it says "Class Not Found".
return (new $events[1]);
// Error: Class 'StatusSleeper' Not Found
However, when I include the namespace in the lookup table, it works: