示例#1
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show(Apartment $apartment, Lease $lease)
 {
     //
     $title = $lease->apartment->property->name . ' ' . $lease->apartment->name . ' Lease: ' . $lease->startdate->format('n/j/Y') . ' - ' . $lease->enddate->format('n/j/Y');
     $tenants = Tenant::all();
     return view('leases.show', ['title' => $title, 'lease' => $lease, 'tenants' => $tenants]);
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     return Tenant::all();
 }