view.php 884 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. declare(strict_types=1);
  3. return [
  4. 'engine' => \Hyperf\ViewEngine\HyperfViewEngine::class,
  5. 'mode' => \Hyperf\View\Mode::TASK,
  6. 'config' => [
  7. 'view_path' => BASE_PATH . '/storage/view/',
  8. 'cache_path' => BASE_PATH . '/runtime/view/',
  9. ],
  10. 'components' => [
  11. 'smarty' => [
  12. 'class' => \App\View\Engine\SmartyEngine::class,
  13. 'constructor' => [
  14. 'options' => [
  15. 'left_delimiter' => '{{',
  16. 'right_delimiter' => '}}',
  17. 'compile_dir' => BASE_PATH . '/runtime/smarty/compile/',
  18. 'cache_dir' => BASE_PATH . '/runtime/smarty/cache/',
  19. 'template_dir' => BASE_PATH . '/storage/view/',
  20. ],
  21. ],
  22. ],
  23. ],
  24. 'composers' => [
  25. \App\View\Composers\GlobalComposer::class,
  26. ],
  27. ];