Just wondering if there is anything I should know about these two.
Is there one to avoid or are both equally accepted and just a matter of personel preference?
$container[‘view’] = function ($container) {
$settings = $c->get(‘settings’);
$view = new \Slim\Views\Twig($settings[‘view’][‘template_path’], $settings[‘view’][‘twig’]);
return $view;
};
$container[‘view’] = function ($container) use ($settings) {
$view = new \Slim\Views\Twig($settings[‘settings’][‘view’][‘template_path’], $settings[‘settings’][‘view’][‘twig’]);
return $view;
};