Example #1
0
 public function setGovernorateIdAttribute($value)
 {
     $this->attributes['governorate_id'] = \App\Governorate::findId('governorate', $value);
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     //
     $donor = Donor::find($id);
     $gov = \App\Governorate::find($donor->governorate_id)->governorate;
     $blood_type = \App\Blood::find($donor->blood_id)->blood;
     return view('admin.show', compact("donor", "gov", "blood_type"));
 }