<?php

use CodeIgniter\Router\RouteCollection;

/** @var RouteCollection $routes */
$routes->get('/', 'Home::index');

// ROUTE DINAMIS UNTUK HALAMAN DOKUMEN ANDA
// (:any) artinya menerima teks apa saja setelah 'user/dokumenfile/' (word, excel, ppt, dll)
$routes->get('dokumenfile', 'Home::dokumenfile');
$routes->get('tutorial', 'Home::tutorial');
$routes->get('infografis', 'Home::infografis');
$routes->get('kontak', 'Home::kontak');
$routes->get('detdoc', 'Home::detdoc');
$routes->get('perpustakaan', 'Home::perpustakaan');
$routes->get('pojokilmu', 'Home::pojokilmu');
$routes->get('tools', 'Home::tools');
$routes->get('resize_tools', 'Home::resize');
$routes->get('compres_image', 'Home::compres');
$routes->get('convert_image', 'Home::convert');
$routes->get('create_qr', 'Home::qrcode');
$routes->get('tandatangan', 'Home::tandatangan');
$routes->get('about', 'Home::about');
$routes->get('kebijakan', 'Home::kebijakan');
$routes->get('profil', 'Home::profil');

// INI UNTUK ADMIN
$routes->get('admin', 'Admin::admin');
$routes->get('inputdokumen', 'Admin::inputdokumen');
$routes->get('inputtutor', 'Admin::inputtutor');
$routes->get('inputgrafis', 'Admin::inputgrafis');
$routes->get('komentar', 'Admin::komentar');

$routes->post('admin/simpandoc', 'Admin::simpandoc');
$routes->post('admin/simtutor', 'Admin::simtutor');
$routes->post('admin/siminfografis', 'Admin::siminfografis');

$routes->get('baca_tutorial/(:num)', 'Home::baca/$1');
$routes->get('baca_pojok/(:num)', 'Home::pojok_ilmu/$1');
$routes->get('lihat_infografis/(:num)', 'Home::lihatinfo/$1');
$routes->get('lihat_perpus/(:num)', 'Home::lihatperpus/$1');