title = "Location" url = "/location" layout = "Dashboard" is_hidden = 0 [session] security = "user" allowedUserGroups[] = "admin" allowedUserGroups[] = "supplier" redirect = "dashboard/login" == vendor; $this['locations'] = Location::orderBy('created_at', 'desc')->get(); $this['active_location'] = Location::orderBy('created_at', 'desc')->where('published', 1)->count(); $this['all_location'] = Location::orderBy('created_at', 'desc')->count(); } $this['location'] = Location::make(); } function onDelete() { $locationId = Input::post('id_location'); $location = Location::find($locationId); if ($location) { $location->delete(); } return redirect()->refresh(); } ?> ==
Location Active

{{active_location}} {{ (active_location > 1) ? 'Locations' : 'Location'}}

All Location

{{all_location}} {{ (all_location > 1) ? 'Locations' : 'Location'}}

List Locations

Add

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