Пример #1
0
 public function test_to_json()
 {
     $this->repository = $this->createRepository();
     $expected = ['theme1', 'theme2'];
     $result = $this->repository->toJson();
     $this->assertSame($expected, array_column(json_decode($result, true), 'name'));
 }
Пример #2
0
 /**
  * Register a view composer to current theme.
  *
  * @param string|array $views
  * @param string|callable $callback
  * @param int|null $priority
  * @static
  */
 public static function composer($views, $callback, $priority = null)
 {
     return \Pingpong\Themes\Repository::composer($views, $callback, $priority);
 }
Пример #3
0
 /**
  * Get theme path.
  *
  * @return mixed
  */
 public function getPath()
 {
     return $this->path ?: $this->config->get('themes.path');
 }