aboutsummaryrefslogtreecommitdiffhomepage
path: root/main/app/sprinkles/admin/routes/admin.php
blob: 266909762a4d1b6fe2ae992e51317e8bb63b3095 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/**
 * UserFrosting (http://www.userfrosting.com)
 *
 * @link      https://github.com/userfrosting/UserFrosting
 * @license   https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
 */

/**
 * Routes for administrative panel management.
 */
$app->group('/dashboard', function () {
    $this->get('', 'UserFrosting\Sprinkle\Admin\Controller\AdminController:pageDashboard')
        ->setName('dashboard');
})->add('authGuard');

$app->group('/api/dashboard', function () {
    $this->post('/clear-cache', 'UserFrosting\Sprinkle\Admin\Controller\AdminController:clearCache');
})->add('authGuard');

$app->group('/modals/dashboard', function () {
    $this->get('/clear-cache', 'UserFrosting\Sprinkle\Admin\Controller\AdminController:getModalConfirmClearCache');
})->add('authGuard');