slim-4 Questions

2

Solved

I need to get all registed routes to work with into a controller. In slim 3 it was possible to get the router with $router = $container->get('router'); $routes = $router->getRoutes(); Wit...
Expansion asked 10/1, 2020 at 11:3

1

Solved

I would like to know how I can access route parameter in a middleware in Slim 4. Provided I define a route with placeholder and attached middleware: <?php // ... $app ->get('/{userId}', ...
Etesian asked 22/4, 2020 at 23:4

1

Solved

I'm strugling with authorization middleware in Slim4. Here's my code: $app = AppFactory::create(); $app->add(new Authentication()); $app->group('/providers', function(RouteCollectorProxy $g...
Inunction asked 14/1, 2020 at 10:5

1

Solved

I've set up a new app based on the SlimPHP team's Slim Skeleton application. Inside of my route definitions, I want to be able to access the route parser as described in the Slim4 documentation. So...
Rudolfrudolfo asked 6/1, 2020 at 22:16

3

Solved

I'm trying to add twig-view in slim v4 In slim v3, we add twig-view in container $container['view'] = function ($c) { $view = new \Slim\Views\Twig('path/to/templates', [ 'cache' => 'path/to...
Merovingian asked 13/8, 2019 at 4:8

1

Solved

I'm migrating from Slim/3 to Slim/4. I've found or figured out replacements for all the features I was using that have been removed, except 404 Not Found Handler (part of the now gone App::$setting...
Confirm asked 25/8, 2019 at 17:8
1

© 2022 - 2024 — McMap. All rights reserved.