Example #1
0
                if (isset($widgetItem['disabled']) && ($widgetItem['disabled'] === true || $widgetItem['disabled'] == "true")) {
                    return false;
                }
                return true;
            });
            $widgets[$widgetPlacement['id']] = $widgetItems;
        }
    }
    View::share('widgets', $widgets);
    if (Auth::check()) {
        View::share('userData', Auth::user());
    }
    //Load custom email config from database
    CustomEmailSettings::loadEmailConfigFromDB();
    //Activate notification system for edit list
    ViralList::observe(new \Notifications\EditListNotifier\EditListModelObserver());
    //Activate notification system for list approval
    \Notifications\ApprovedListNotifier\ApprovedListNotificationEventHandler::enable();
});
//Getting Categories
App::before(function ($request) {
    BaseController::loadCategories();
    BaseController::setupShortCodes();
});
App::after(function ($request, $response) {
    //
});
/*
|--------------------------------------------------------------------------
| Authentication Filters
|--------------------------------------------------------------------------