Answer the question
In order to leave comments, you need to log in
How to generate a 404 in the controller so that the rules are applied with $app->error(...)?
Hi all. I can’t solve one question, here are the config settings and error handling -
$app->error(function (\Exception $e, $code) use ($app) {
if (!$app['config']['debug']) {
switch ($code) {
case 404:
return $app['twig']->render('error/404.html.twig');
default:
return $app['twig']->render('error/500.html.twig');
}
}
});
$this->app->abort(404, 'msg');
return new Response('Error', 404);
Answer the question
In order to leave comments, you need to log in
Look towards OWL, with its help you can implement such a slider.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question