I want to initiate a model object using a variable model class.
$model = new Role();
// This works
$className = "Role";
$model = new $className();
// This is not working
// PHP Fatal Error – yii\base\ErrorException
// Class 'Role' not found
Any help will be appreciated.