Created
May 26, 2019 17:41
-
-
Save wpconsulate/61505211ce2b2f4bc883699df3b1bff0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$listing = new Listing; | |
$contact = new Contact; | |
$listing->status = Input::get('status'); | |
$listing->listingfor = Input::get('listingfor'); | |
$listing->propertystatus = Input::get('propertystatus'); | |
$listing->propertytype = Input::get('propertytype'); | |
$listing->userid = Auth::user()->id; | |
$listing->reference_id = Input::get('reference_id'); | |
$listing->location = Input::get('location'); | |
$listing->lifestyle = Input::get('lifestyle'); | |
$listing->category = Input::get('category'); | |
$listing->apartment_area = Input::get('apartment_area'); | |
$listing->garden_area = Input::get('garden_area'); | |
$listing->parking = Input::get('parking'); | |
$listing->visitors_parking = Input::get('visitors_parking'); | |
$listing->driver_room = Input::get('driver_room'); | |
$listing->furnished = Input::get('furnished'); | |
$listing->salons = Input::get('salons'); | |
$listing->family_room = Input::get('family_room'); | |
$listing->master_bedrooms = Input::get('master_bedrooms'); | |
$listing->balconies = Input::get('balconies'); | |
$listing->standard_bedrooms = Input::get('standard_bedrooms'); | |
$listing->maid_room = Input::get('maid_room'); | |
$listing->dining_room = Input::get('dining_room'); | |
$listing->bathrooms = Input::get('bathrooms'); | |
$listing->contact_id = $contact_id; | |
$listing->save(); | |
//$specifications = Specification::find($id); | |
if($listing->save()) { | |
$specifications = new Specification; | |
$id = 0; | |
$specifications->listing_id = $id; | |
$specifications->swimming_pool = Input::get('swimming_pool'); | |
$specifications->water_front = Input::get('water_front'); | |
$listing->specifications()->save($specifications); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment