title = "Add On" url = "/addon" layout = "Dashboard" is_hidden = 0 [session] security = "user" allowedUserGroups[] = "admin" allowedUserGroups[] = "supplier" redirect = "dashboard/login" == vendor; $this['addons'] = Addon::orderBy('created_at', 'desc')->where('vendor_id', $user->vendor)->get(); $this['active_addon'] = Addon::orderBy('created_at', 'desc')->where('vendor_id', $user->vendor)->where('published', 1)->count(); $this['all_addon'] = Addon::orderBy('created_at', 'desc')->where('vendor_id', $user->vendor)->count(); } $this['addon'] = Addon::make(); } function onDelete() { $addonId = Input::post('id_addon'); $addon = Addon::find($addonId); if ($addon) { $addon->delete(); } return redirect()->refresh(); } ?> ==
Add On Active

{{active_addon}} {{ (active_addon > 1) ? 'Add Ons' : 'Add On'}}

All Add On

{{all_addon}} {{ (all_addon > 1) ? 'Add Ons' : 'Add On'}}

List Add Ons

Add

{% for key, addon in addons %} {% endfor %}
Name Published Created
{{ addon.name }} {{ (addon.published == 1) ? 'Yes' : 'No' }} {{ addon.created_at|date('d F Y') }}
{% put scripts %} {% endput %}