I am not sure if I understand.
Make sure the class is autoloaded. If it's in the app or vendor folder it will be. If not you have to add the file to the autoload section of the composer.json.
Once you know that php will be able to locate the file location for the class you can create an inctance with
$className = $json[...];
$instance = new $className;
To send the full class name to your JS you can do get_class($instance)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community