PHP dynamic class name laravel
Ok the answer to this is I needed a namespace on the class.
In composer.json
"psr-4": { "SplitTest\\": "app/library/SplitTest/"}
Then called the class as so:
$class= "//SplitTest//Variant";$s = new Variant();$nc = new $class();
If you to the psr-4 definition you will need to run
php artisan dump-auto