Hospitality

This is the complete hospitality plugin with booking table, quick reservation and menu features. Manage your restaurant or cafe easily.

Back to Hospitality Support

flammo76640
flammo76640

I copy this code from documentation: function onStart() { $this['foods'] = ''; $foods = DB::table('hospitality_foods')->where('status', 1)->orderBy('name')->get();

foreach ($foods as $food)
{
    $this['foods'] .= '
    <div class="food-details">
        <div class="food-name">'.$food->name.'</div>
        <div class="food-price">'.$food->price.'</div>
    </div>';
}

}

html

{% foods|raw %}

and I have error:

  1. Undefined property: stdClass::$price okey, if I delete this row
  2. {% foods|raw %} Unknown "foods" tag.

How to fix that?

gergo85
gergo85

I updated the documentation. Please insert the new php and html code to your website.

1-2 of 2