Answers for "laravel where and blade"

PHP
0

laravel where and blade

// NOTE: all project with open and processed that you have not submitted an offer yet.

// NOTE 1 (Controller): all projects with open and processed
$projects = Project::whereIn('status_id', [2,3])->get();

// NOTE 2 (Blade):
@if (count($project->projectOffers->where('teacher_id',auth()->user()->id)) == 0)
// Your code
@endif
Posted by: Guest on April-28-2021

Browse Popular Code Answers by Language