Is is possible to concatenate a string to Model? The below doesn't seem to work.
I have Car Model and Train Model. Vehicle will be either Car or Train.
$vehicle = 'Car';
$result = $vehicle::where('model', $value)->count() > 0;
The above code exists the following error.
Symfony\Component\Debug\Exception\FatalThrowableError: Class 'Car' not found in file
How can I concatenate? Is it possible?