/**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index($id)
 {
     $properties = Bedroom::select('id', 'bedroom_asigned', 'status', 'beds', 'size_metrics', 'description', 'image', 'property_id')->with('Property')->where('property_id', '=', $id)->get();
     $count = Bedroom::select('id', 'property_id')->with('Property')->where('property_id', '=', $id)->count();
     return view('admin.properties.bedrooms.show', compact('properties', 'count'));
     //dd($properties);
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show()
 {
     $user_id = Auth::user()->id;
     $user_role = User::findOrfail($user_id);
     $properties = Property::select('id', 'name', 'image', 'status', 'num_bedrooms', 'description', 'country_id', 'service_id', 'state_id', 'city_id', 'property_type_id', 'user_id')->with('country')->with('service')->with('state')->with('city')->with('property_type')->with('user')->orderBy('name', 'ASC')->get();
     $roomsA = Bedroom::select('id', 'property_id', 'status')->where('bedrooms.property_id', '=', 'property.id')->get();
     return view('admin.properties.show', compact('properties', 'service', 'state', 'city', 'property_type', 'user', 'user_role'));
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $properties = Bedroom::select('id', 'bedroom_asigned', 'status', 'beds', 'size_metrics', 'description', 'image', 'property_id')->with('Property')->where('property_id', '=', $id)->get();
     $count = Bedroom::select('id', 'property_id')->with('Property')->where('property_id', '=', $id)->count();
     $user_id = Auth::user()->id;
     $user_role = User::findOrfail($user_id);
     return view('admin.properties.bedrooms.show', compact('properties', 'count', 'user_role'));
     //dd($properties);
 }