setDefaultNamespace('App\Controllers'); $routes->setDefaultController('Authentication'); $routes->setDefaultMethod('index'); $routes->setTranslateURIDashes(false); $routes->set404Override(); // The Auto Routing (Legacy) is very dangerous. It is easy to create vulnerable apps // where controller filters or CSRF protection are bypassed. // If you don't want to define all routes, please use the Auto Routing (Improved). // Set `$autoRoutesImproved` to true in `app/Config/Feature.php` and set the following to true. // $routes->setAutoRoute(false); /* * -------------------------------------------------------------------- * Route Definitions * -------------------------------------------------------------------- */ // We get a performance increase by specifying the default // route since we don't have to scan directories. # Authentication Routes $routes->get('/', 'Authentication::index'); $routes->get('login/', 'Authentication::index'); $routes->post('authenticate/', 'Authentication::authenticate');//Routes For Authentication. $routes->get('logout/', 'Authentication::logout'); $routes->get('auth_confirm_mail/', 'Authentication::auth_confirm_mail');//Routes For Confirmation Mail alert page. $routes->get('auth_reset_password/', 'Authentication::auth_reset_password');//Routes For Load Reset password Page. $routes->post('auth_reset_password_save/', 'Authentication::auth_reset_password_save');//Routes For update the Resetted password. $routes->get('lockscreen/', 'Authentication::lockscreen'); $routes->get('lock/', 'Authentication::lock'); $routes->post('unlock/', 'Authentication::unlock'); # Dashboard Routes $routes->get('dashboard/', 'Home::index'); # Users Routes $routes->get("user_list/", "Users::index"); $routes->get("user_page/(:any)", "Users::user_page/$1"); $routes->post("insert_users", "Users::insert_users"); $routes->get("delete_user/(:any)", "Users::delete_user/$1"); # Books Routes $routes->get("book_list/", "Books::index"); $routes->get("book_page/(:any)", "Books::book_page/$1"); $routes->post("insert_books", "Books::insert_books"); $routes->get("delete_books/(:any)", "Books::delete_books/$1"); # Site-Setting Routes $routes->get("sitesetting_list/", "Settings::index"); $routes->get("sitesetting_page/(:any)", "Settings::sitesetting_page/$1"); $routes->post("sitesetting_synchronization", "Settings::sitesetting_synchronization"); $routes->get("delete_sitesetting/(:any)", "Books::delete_sitesetting/$1"); # Business Routes $routes->get("business_list/", "Business::index"); $routes->get("new_bussiness/(:any)", "Business::new_bussiness/$1"); $routes->post("insert_business/", "Business::insert_business"); $routes->get("delete_business/(:any)", "Business::delete_business/$1"); # Custome Routes $routes->get("customer_list/", "Customer::index"); $routes->get("new_customer/(:any)", "Customer::new_customer/$1"); $routes->post("insert_customer", "Customer::insert_customer"); $routes->get("delete_customer/(:any)", "Customer::delete_customer/$1"); # Scheme Routes $routes->get("scheme_list/", "Scheme::index"); $routes->get("new_scheme/(:any)", "Scheme::new_scheme/$1"); $routes->post("insert_scheme/", "Scheme::insert_scheme"); $routes->get("delete_scheme/(:any)", "Scheme::delete_scheme/$1"); #subscription Routes $routes->get("subscribers_list/", "Subscription::index"); $routes->get("new_subscription_invoice/(:any)", "Invoice::new_subscription_invoice/$1"); $routes->post("add_subscription/", "Subscription::add_subscription/"); $routes->post('subscription/download_details', 'Subscription::download_details'); #adres priknt $routes->get('addressprint/', 'Address::index'); $routes->post('address/generatePdf', 'Address::generatePdf'); #evnts $routes->get("event_list/", "Event::index"); $routes->get("new_event/(:any)", "Event::new_event/$1"); $routes->post("insert_event/", "Event::insert_event"); #invoices $routes->get("invoice_list/", "Invoice::index"); $routes->get("new_book_invoice/(:any)", "Invoice::new_book_invoice/$1"); $routes->get("new_subscription_invoice/(:any)", "Invoice::new_subscription_invoice/$1"); $routes->post("load_details1/", "Invoice::load_details1/"); $routes->post("load_details2/", "Invoice::load_details2/"); $routes->post("save_invoice/", "Invoice::save_invoice/"); $routes->get("delete_invoice/(:any)", "Invoice::delete_invoice/$1"); $routes->add('approve_invoice/(:num)', 'Invoice::approve_invoice/$1'); $routes->get('generate_invoice_pdf/(:num)', 'Invoice::generate_invoice_pdf/$1'); $routes->get('print_address/(:num)', 'Invoice::print_address/$1'); # Notifications Routes $routes->get('send_whatsapp_message/', 'Notifications::send_whatsapp_message'); $routes->post('whatsapp_custom_notifications/', 'Notifications::whatsapp_custom_notifications'); $routes->match(['post', 'get'], 'mail_custom_notifications', 'Notifications::mail_custom_notifications'); # Api integration Routes $routes->post('api/(:any)', 'ApiIntegration::api_integration/$1'); // $routes->group("api", function ($routes) { // // $routes->post("create_products/", "ApiIntegration::save_book_details"); // // $routes->match(['put', 'post', 'get', 'delete'], 'products', 'ApiIntegration::book_api_integration'); // // $routes->match(['put', 'post', 'get', 'delete'], 'customers', 'ApiIntegration::customer_api_integration'); // // $routes->match(['put', 'post', 'get', 'delete'], 'orders', 'ApiIntegration::sales_api_integration'); // }); /* * -------------------------------------------------------------------- * Additional Routing * -------------------------------------------------------------------- * * There will often be times that you need additional routing and you * need it to be able to override any defaults in this file. Environment * based routes is one such time. require() additional route files here * to make that happen. * * You will have access to the $routes object within that file without * needing to reload it. */ if (is_file(APPPATH . 'Config/' . ENVIRONMENT . '/Routes.php')) { require APPPATH . 'Config/' . ENVIRONMENT . '/Routes.php'; }