How can i create a Nova filter that will allow me to filter my Question resource by another resource called Module?
The question belongsTo to the module (module_id is FK on Questions).
So for the apply method i have:
public function apply(Request $request, $query, $value)
{
return $query->where('module_id', $value);
}
I'm struggling with the options method. I would like to have the module->name as the key and the module->id as the value but would like to display all modules.