/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { $tenants = Tenant::findOrFail($id); $tname = $tenants->name . ' ' . $tenants->lname; $houses = Occupancy::where('tenant', '=', $tname)->get(); return View::make('backend.code.tenants.show', compact('tenants', 'houses')); }
/** * Display the specified resource. * GET /accountreceivables/{id} * * @param int $id * @return Response */ public function show($id) { $occupancies = Occupancy::where('houseID', $id)->get(); return View::make('backend.code.occupancy.show', compact('occupancies')); }
/** * Show the form for editing the specified resource. * GET /accountreceivables/{id}/edit * * @param int $id * @return Response */ public function edit($id) { $occupancies = Occupancy::where('houseID', $id)->first(); $tenants = Tenant::where('agent_id', '=', Sentry::getUser()->id)->get(); return View::make('backend.code.occupancy.edit', compact('occupancies', 'tenants')); }