get('/economic/layouts', function () { global $response; $this->requirePermission('economic_layouts'); $user = (new authentication())->get_user(); if ($user) { (new logs_o())->add('economic_layouts', 'global', 1, $user->id, 'ECONOMIC_LAYOUTS', 'Successfully fetched economic layouts'); $response->success( (new economic())->layouts->get()->collection ); } else { (new logs_o())->add('economic_layouts', 'global', 1, 0, 'ECONOMIC_LAYOUTS', 'No user found, or invalid session'); $response->error('Invalid session', 400); } }, [ 'economic_layouts' => 'Get economic layouts' ] ); } }