Last Updated: February 25, 2016
·
806
· crynobone

Enabling Profiler only for Orchestra Platform Administrator Account

Here a simple way to use Route::filter() to enable profiler just for Orchestra Platform administrator account.

<?php

Route::filter('before', function ()
{
    if (Orchestra::acl()->can('Manage Orchestra'))
    {
        Config::set('application.profiler', true);
        Config::set('error.detail', true);
        Profiler::attach();
    }
});