first commit
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
use CodeIgniter\Router\RouteCollection;
|
||||
|
||||
/** @var RouteCollection $routes */
|
||||
|
||||
// Publiczne (logowanie jednego uzytkownika z .env)
|
||||
$routes->get('login', 'Auth::login');
|
||||
$routes->post('login', 'Auth::login');
|
||||
$routes->get('logout', 'Auth::logout');
|
||||
|
||||
// Chronione filtrem 'auth'
|
||||
$routes->group('', ['filter' => 'auth'], static function (RouteCollection $routes): void {
|
||||
$routes->get('/', 'Dashboard::index');
|
||||
$routes->get('dashboard', 'Dashboard::index');
|
||||
$routes->get('finances', 'Dashboard::finances');
|
||||
|
||||
// Kategorie
|
||||
$routes->get('categories', 'Categories::index');
|
||||
$routes->get('categories/new', 'Categories::new');
|
||||
$routes->post('categories', 'Categories::create');
|
||||
$routes->get('categories/(:num)/edit', 'Categories::edit/$1');
|
||||
$routes->post('categories/(:num)', 'Categories::update/$1');
|
||||
$routes->get('categories/(:num)/delete', 'Categories::delete/$1');
|
||||
|
||||
// Operacje
|
||||
$routes->get('operations', 'Operations::index');
|
||||
$routes->get('operations/new', 'Operations::new');
|
||||
$routes->post('operations', 'Operations::create');
|
||||
$routes->get('operations/(:num)/edit', 'Operations::edit/$1');
|
||||
$routes->post('operations/(:num)', 'Operations::update/$1');
|
||||
$routes->get('operations/(:num)/delete', 'Operations::delete/$1');
|
||||
|
||||
// Inwestycje — pulpit
|
||||
$routes->get('investments', 'Investments::index');
|
||||
|
||||
// Inwestycje — instrumenty
|
||||
$routes->get('instruments', 'Instruments::index');
|
||||
$routes->get('instruments/new', 'Instruments::new');
|
||||
$routes->post('instruments', 'Instruments::create');
|
||||
$routes->get('instruments/(:num)/edit', 'Instruments::edit/$1');
|
||||
$routes->post('instruments/(:num)', 'Instruments::update/$1');
|
||||
$routes->get('instruments/(:num)/delete', 'Instruments::delete/$1');
|
||||
|
||||
// Inwestycje — operacje (wpłaty/wypłaty)
|
||||
$routes->get('investments/operations', 'InvOperations::index');
|
||||
$routes->get('investments/operations/new', 'InvOperations::new');
|
||||
$routes->post('investments/operations', 'InvOperations::create');
|
||||
$routes->get('investments/operations/(:num)/edit', 'InvOperations::edit/$1');
|
||||
$routes->post('investments/operations/(:num)', 'InvOperations::update/$1');
|
||||
$routes->get('investments/operations/(:num)/delete', 'InvOperations::delete/$1');
|
||||
|
||||
// Inwestycje — wyceny
|
||||
$routes->get('investments/valuations', 'Valuations::index');
|
||||
$routes->get('investments/valuations/new', 'Valuations::new');
|
||||
$routes->post('investments/valuations', 'Valuations::create');
|
||||
$routes->get('investments/valuations/(:num)/edit', 'Valuations::edit/$1');
|
||||
$routes->post('investments/valuations/(:num)', 'Valuations::update/$1');
|
||||
$routes->get('investments/valuations/(:num)/delete', 'Valuations::delete/$1');
|
||||
});
|
||||
Reference in New Issue
Block a user