예제 #1
0
 public function index()
 {
     $projects = Project::whereHas('status', function ($q) {
         $q->where('key', '=', 'published');
     })->paginate(12);
     return view('users.project.main', ['projects' => $projects]);
 }