7 |
41 |
42 |
Default credentials
43 |
44 | - user email: bettie14@gmail.com, password: secret
45 | - moderator email: waters.johann@hotmail.com, password: secret
46 | - administrator email: denesik.stewart@gmail.com, password: secret
47 |
48 |
49 |
50 | {% endblock %}
51 |
--------------------------------------------------------------------------------
/server/resources/views/pages/en/users.html.twig:
--------------------------------------------------------------------------------
1 | {% extends 'pages/en/base/with-header-and-footer.master.html.twig' %}
2 |
3 | {% block title %}Limoncello Users{% endblock %}
4 |
5 | {% block content %}
6 |
39 |
Filters, sorting and pagination
40 |
Do you know users can be filtered and sorted?
41 |
42 | - Filter by name and type with sorting
{{ host_name }}/users?filter[first-name][like]=%a%&filter[role][eq]=user&sort=-last-name click
43 | - Pagination
{{ host_name }}/users?page[offset]=1&page[limit]=3 click
44 |
45 |
46 | {% endblock %}
47 |
--------------------------------------------------------------------------------
/server/app/Routes/ApiRoutes.php:
--------------------------------------------------------------------------------
1 | group(self::API_URI_PREFIX, function (GroupInterface $routes): void {
41 |
42 | $routes->addContainerConfigurators([
43 | FluteContainerConfigurator::CONFIGURE_EXCEPTION_HANDLER,
44 | ]);
45 |
46 | self::apiController($routes, UserSchema::TYPE, UsersController::class);
47 |
48 | self::apiController($routes, RoleSchema::TYPE, RolesController::class);
49 | self::relationship($routes, RoleSchema::TYPE, RoleSchema::REL_USERS, RolesController::class, 'readUsers');
50 | });
51 | }
52 |
53 | /**
54 | * This middleware will be executed on every request even when no matching route is found.
55 | *
56 | * @return string[]
57 | */
58 | public static function getMiddleware(): array
59 | {
60 | return [
61 | //ClassName::class,
62 | ];
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/server/resources/views/pages/en/base/with-header-and-footer.master.html.twig:
--------------------------------------------------------------------------------
1 | {% extends 'pages/en/base/master.html.twig' %}
2 |
3 | {% block header %}
4 | {{ parent() }}
5 |