Actually I solved this. In case anyone is interested, it's a namespacing issuing. This change got it working:
if($modconfig['needs_models']) {
$models = explode(",",$modconfig['models_needed']);
$modelsas = explode(",",$modconfig['models_as']);
foreach ($models as $key => $value) {
$class= "App\\" . $value;
$data[$modelsas[$key]] = $class::all();
}
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community