/**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @return Response
  */
 public function destroy()
 {
     $id = $_GET['id'];
     $bed = Beds::find($id);
     $bed->delete();
     return Redirect::route('adminipd.index');
 }
Example #2
0
function getBedTypes()
{
    $beds = new Beds();
    $beds->setVillaId($_REQUEST['hotell_id']);
    $beds_list = $beds->getAllBedTypes();
    if (empty($beds_list)) {
        echo "Add Bed Types";
    } else {
        for ($b = 0; $b < count($beds_list); $b++) {
            $beds->extractor($beds_list, $b);
            ?>
                <input type="checkbox" <?php 
            if ($b == 0) {
                echo "id='bed_type'";
            }
            ?>
 name="bed_type" value="<?php 
            echo $beds->id();
            ?>
" class="bed_type send_group send_data"/>
                <?php 
            echo $beds->name();
        }
    }
}