1// NOTE: all project with open and processed that you have not submitted an offer yet.
2
3// NOTE 1 (Controller): all projects with open and processed
4$projects = Project::whereIn('status_id', [2,3])->get();
5
6// NOTE 2 (Blade):
7@if (count($project->projectOffers->where('teacher_id',auth()->user()->id)) == 0)
8// Your code
9@endif