$mainCity = new MainCity(); $mCities = $mainCity->all(); $subCity = new SubCity(); $sCities = $subCity->all(); if(isset($_SESSION['editing_hotel']) && (strlen($_SESSION['editing_hotel']) > 0)){ $hotel = new Hotel(); $hotel = $hotel->find($_SESSION['editing_hotel']); if(!$hotel){ die(header('Location: ' . DOMAIN . '404')); } $categoryHotel = new CategoryHotel(); $categoryHotel = $categoryHotel->where('hotel_id', '=', $_SESSION['editing_hotel'])->get(); $categoryIds = []; foreach($categoryHotel as $categoryId){ $categoryIds[] = $categoryId->category_id; } $subCityName = $subCity->find($hotel->sub_city_id); $subCityName = $subCityName->name; $coverPhotos = explode(',', $hotel->cover_photo); $coverPhotos = array_filter($coverPhotos); } ?> <form action="<?php echo HTTP; ?>dashboard/get_step_01.php" method="post" enctype="multipart/form-data"> <input type="hidden" value="d1c4ed87775fffbab3acc36170b0cf2d" name="csrf"/> <fieldset> <legend>Hotel Registration/Property-details</legend> <h3 class="h3">Hotel information</h3> <div class="form-group"> <label for="hotelName">Hotel Name<span class="text-danger">*</span></label> <input type="text" value="<?php echo isset($hotel->name) ? $hotel->name: ''; ?>" name="hotelName" class="form-control" placeholder="Hotel name" required="required"> </div>