|--------------------------------------------------------------------------
| Application & Route Filters
|--------------------------------------------------------------------------
|
| Below you will find the "before" and "after" events for the application
| which may be used to do any work before or after a request into your
| application. Here you may also register your custom route filters.
|
*/
App::before(function ($request) {
    /**
     * Share the pages the user is able to access to the views under 
     * the $pages variable.
     *
     */
    View::share('pages', Access::pages());
    /**
     * Share the quick links with the views using the
     * the $quickLinks variable.
     *
     */
    View::share('quickLinks', QuickLink::get(['name', 'url', 'icon']));
    /**
     * Share the site options with the views under
     * the $siteOptions variable.
     *
     */
    $options = Option::get(['name', 'value']);
    foreach ($options as $option) {
        $o[$option->name] = $option->value;
    }