So, what I'm trying to obtain is a related model class given an other model class and a column name which is a FK.
Suppose I have a model named 'Event' and a model named 'ShowStatus' and the Event model has 'show_type_id' as foreign key of ShowStatus.
// ...
$model = 'App\Models\Event'; // or an instance of that model
$column = 'show_type_id';
$relatedModel = getRelatedModel($column, $model); // 'App\Models\ShowStatus' should be returned
Is there something in Laravel that can do that?