Esempio n. 1
0
 public function create()
 {
     $rented = Contract::select('property_id')->get();
     $renters = Renter::select('id', 'first_name', 'last_name')->get()->toArray();
     $properties = Property::select('id', 'address')->whereNotIn('id', $rented)->get()->toArray();
     return view('contracts.create', compact('rented', 'renters', 'properties'));
 }