/**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($farmerId, $id)
 {
     $farmerCrop = FarmerCrop::find($id);
     $farmerCrop->delete();
     return redirect("farmer/{$farmerId}");
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $farmerPoint = FarmerPoint::find($id);
     $farmerCrop = FarmerCrop::with('users')->where('farmer_point_id', 'id');
     return view('FarmerPoint.FarmerPointDetail', ['farmerPoint' => $farmerPoint, 'farmerCrop' => $farmerCrop]);
 }
Ejemplo n.º 3
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $farmer = User::find($id);
     $farmerCropList = FarmerCrop::where('user_id', $id)->get();
     return view('farmer.FarmerProfile', ['farmer' => $farmer, 'farmerCropList' => $farmerCropList]);
     //                ->with('farmerCrop',$farmer);
 }