-1
私はその後、私は私がユーザーIDに基づいて「USERTABLE」からのデータを表示したいのuserIdを持っているこの5データ内の5個のデータを得たジョブIDに基づいて「jobTable」からのデータと一致したいを使用したデータを検索します。それから私は変数でそれをキャッチし、私は私のビューでそれを表示したい、私はそれをループを使用して表示されます。Laravelフレームワーク
私はコードの下にこれを行う場合、それは私のUSERTABLEからのすべてのデータが一致したジョブIDベースのUserId詳細に基づいて表示されませ示しています。
public function applyUser($jobId){
$applyUsers=ApplyInfo::where('job_id', $jobId)->get();
//5 rows found, with in this 5 rows everybody has userId I want to show data from user table based on this found userId and pass value a variable then i will loop it on view page.
foreach ($applyUsers as $applyUser){
$applyUsersDtials=Employee::find($applyUser->user_id)->get();
}
return view('front.user.apply-user-details', ['applyUsersDtials'=>$applyUsersDtials]);
}
//when i do that that time show all data based on my user table not show based on my JobId
ありがとうBro @Risul Islamは現在動作しています。要点は、真実を配列として宣言する必要があることです。 –