App.php 615 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace App\View\Composers;
  3. use Roots\Acorn\View\Composer;
  4. class App extends Composer
  5. {
  6. /**
  7. * List of views served by this composer.
  8. *
  9. * @var array
  10. */
  11. protected static $views = [
  12. '*',
  13. ];
  14. /**
  15. * Data to be passed to view before rendering.
  16. *
  17. * @return array
  18. */
  19. public function with()
  20. {
  21. return [
  22. 'siteName' => $this->siteName(),
  23. ];
  24. }
  25. /**
  26. * Returns the site name.
  27. *
  28. * @return string
  29. */
  30. public function siteName()
  31. {
  32. return get_bloginfo('name', 'display');
  33. }
  34. }