50 lines
2.4 KiB
PHP
50 lines
2.4 KiB
PHP
<?php
|
|
|
|
use Lycoreco\Apps\Admin\Controllers;
|
|
use Lycoreco\Includes\Routing\Path;
|
|
|
|
$admin_urls = [
|
|
// Dashboard
|
|
new Path('/admin', new Controllers\AdminHomeController(), 'home'),
|
|
|
|
// Lists
|
|
new Path('/admin/users', new Controllers\AdminUserListController(), 'user-list'),
|
|
new Path('/admin/recipes',new Controllers\AdminRecipeListController(), 'recipe-list'),
|
|
new Path('/admin/categories',new Controllers\AdminCategoryListController(), 'category-list'),
|
|
new Path('/admin/ingredients',new Controllers\IngredientListController(), 'ingredient-list'),
|
|
new Path('/admin/reviews', new Controllers\AdminReviewListController(), 'review-list'),
|
|
|
|
////// Single object ///////
|
|
// User
|
|
new Path('/admin/user/new', new Controllers\AdminUserController(true), 'user-new'),
|
|
new Path('/admin/user/[:int]', new Controllers\AdminUserController(false), 'user'),
|
|
|
|
// Ban
|
|
new Path('/admin/user/[:int]/banlist', new Controllers\AdminBanListController(), 'banlist'),
|
|
new Path('/admin/user/[:int]/ban/new', new Controllers\AdminBanController(true), 'ban-new'),
|
|
new Path('/admin/ban/[:int]', new Controllers\AdminBanController(false), 'ban'),
|
|
|
|
// Recipe
|
|
new Path('/admin/recipe/[:int]', new Controllers\AdminRecipeController(), 'recipe'),
|
|
new Path('/admin/recipe/new', new Controllers\AdminRecipeController(true), 'recipe-new'),
|
|
|
|
// Category
|
|
new Path('/admin/category/[:int]', new Controllers\AdminCategoryController(), 'category'),
|
|
new Path('/admin/category/new', new Controllers\AdminCategoryController(true), 'category-new'),
|
|
|
|
// Ingredient
|
|
new Path('/admin/ingredient/[:int]', new Controllers\IngredientController(), 'ingredient'),
|
|
new Path('/admin/ingredient/new', new Controllers\IngredientController(true), 'ingredient-new'),
|
|
|
|
// Reviews
|
|
new Path('/admin/review/[:int]', new Controllers\AdminReviewControler(), 'review'),
|
|
|
|
// Recipe ingedient relation
|
|
new Path('/admin/recipe/[:int]/ingredients', new Controllers\IngredientRecipeRelListController(), 'ing-cat-rel-list'),
|
|
new Path('/admin/recipe/ingredient/[:int]', new Controllers\IngredientRecipeRelController(), 'ing-cat-rel'),
|
|
new Path('/admin/recipe/[:int]/ingredient/new', new Controllers\IngredientRecipeRelController(true), 'ing-cat-rel-new'),
|
|
|
|
// Dynamic delete for every object type
|
|
new Path('/admin/[:string]/[:int]/delete', new Controllers\AdminDeleteController(), 'delete')
|
|
];
|