@mhmmdva yes, and if you want to use Eloquent, then either of the queries I gave you will work:
// Because you already have the `ResearchGroup` instance from Route-Model Binding
$researchGroupStatuses = $researchGroup->researchGroupStatuses()
->where('status', 'basic')
->get();
// If you don't have the correct ResearchGroup instance for some reason
$researchGroupStatuses = ResearchGroupStatus::query()
->where('research_group_id', 1)
->where('status', 'basic')
->get();
i have four status with enum type in laravel (basic, development, commercial, applied) . But with this query,
it displays all three statuses like (basic, development, commercial). I just want to show the basics.
@mhmmdva why would you reference the docs of another framework, when asking a question about Laravel/Eloquent? Read the docs of laravel on eloquent not this yii framework.