public function index()
{
// //TODO: Warn of any routes in our DB that is not used in the app.
Audit::log(Auth::user()->id, trans('admin/routes/general.audit-log.category'), trans('admin/routes/general.audit-log.msg-index'));
$page_title = trans('admin/routes/general.page.index.title');
$page_description = trans('admin/routes/general.page.index.description');
$routes = $this->route->pushCriteria(new RoutesWithPermissions())->pushCriteria(new RoutesByPathAscending())->pushCriteria(new RoutesByMethodAscending())->paginate(20);
$perms = $this->permission->all()->lists('display_name', 'id');
// SR [2016-03-20] Cannot add/prepend a blank item as it reshuffles the array index.
// This cause the permission to not be recognized by the code building the view and
// matching permission with each route. From now on un-setting the permission of a
// few is unsupported by design.
// $perms = $perms->toArray(0);
// array_unshift($perms, '');
return view('admin.routes.index', compact('routes', 'perms', 'page_title', 'page_description'));
}