RVRNEXT-11 add new endpoints for events
This commit is contained in:
parent
82309b81c4
commit
d29fc1c339
13
web.php
13
web.php
@ -13,6 +13,7 @@ use RVR\Controller\UserController;
|
|||||||
use RVR\Controller\UserSearchController;
|
use RVR\Controller\UserSearchController;
|
||||||
use RVR\Controller\CommunityController;
|
use RVR\Controller\CommunityController;
|
||||||
use RVR\Controller\TransactionController;
|
use RVR\Controller\TransactionController;
|
||||||
|
use RVR\Controller\EventController;
|
||||||
use RVR\Repository\UserRepository;
|
use RVR\Repository\UserRepository;
|
||||||
|
|
||||||
require 'app.php';
|
require 'app.php';
|
||||||
@ -91,6 +92,18 @@ Container::$routeCollection->group('communities', function (RouteCollection $rou
|
|||||||
$routeCollection->post('community.transactions.edit-action', '{transactionId}', [TransactionController::class, 'saveTransaction']);
|
$routeCollection->post('community.transactions.edit-action', '{transactionId}', [TransactionController::class, 'saveTransaction']);
|
||||||
$routeCollection->post('community.transactions.delete-action', '{transactionId}/delete', [TransactionController::class, 'deleteTransaction']);
|
$routeCollection->post('community.transactions.delete-action', '{transactionId}/delete', [TransactionController::class, 'deleteTransaction']);
|
||||||
});
|
});
|
||||||
|
$routeCollection->group('events', function (RouteCollection $routeCollection) {
|
||||||
|
$routeCollection->get('community.events', '', [EventController::class, 'getEvents']);
|
||||||
|
$routeCollection->get('community.events.new', 'new', [EventController::class, 'getEventEdit']);
|
||||||
|
$routeCollection->post('community.events.new-action', 'new', [EventController::class, 'saveEvent']);
|
||||||
|
$routeCollection->get('community.events.search', 'search', [EventController::class, 'searchEvent']);
|
||||||
|
$routeCollection->group('{eventSlug}', function (RouteCollection $routeCollection) {
|
||||||
|
$routeCollection->get('community.event', '', [EventController::class, 'getEvent']);
|
||||||
|
$routeCollection->get('community.event.edit', 'edit', [EventController::class, 'getEventEdit']);
|
||||||
|
$routeCollection->post('community.event.edit-action', 'edit', [EventController::class, 'saveEvent']);
|
||||||
|
$routeCollection->post('community.event.delete-action', 'delete', [EventController::class, 'deleteEvent']);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user