armzaazaazaa / softwareengineeringproject

0 stars 0 forks source link

404ค้นหารางวัล #1

Open armzaazaazaa opened 6 years ago

armzaazaazaa commented 6 years ago

if (isset($request->award) && $request->award != "-1") { $projectsBu->whereHas('awards', function ($query) use ($request) { $query->where('id', $request->award); }); }

armzaazaazaa commented 6 years ago

public function awards()//*** { return $this->??????(ProjectAward::class,'project_id'); }

armzaazaazaa commented 6 years ago

if (isset($request->award) && $request->award != "-1") { $projectsBu->whereHas('awards', function ($query) use ($request) { $query->where('id', $request->award); $projectsBu->whereHas('awards.awardDetail', function ($query) use ($request) { $query->where('award_id', $request->award); }); }