cable / cable-view
View library for cable framework
1.0.4
2017-06-09 16:16 UTC
Requires
- cable/cable-config: ^1.0
- cable/cable-container: ^1.2
- cable/cable-facades: ^1.0
- philo/laravel-blade: 3.*
- twig/twig: ~2.0
This package is not auto-updated.
Last update: 2024-11-10 04:01:50 UTC
README
View Library For Cable Framework
$container = \Cable\Container\Factory::create(); $container->singleton( \Cable\Config\Config::class, function () { return new Cable\Config\Config( array( 'view' => [ 'path' => 'view/', 'cache' => 'cache/', ], ) ); } ); $container->addProvider(\Cable\View\ViewServiceProvider::class);
Blade
$blade = $container->make(\Cable\View\BladeDriverInterface::class); echo $blade->make('index', array( 'test' => 'hello world' ));
Twig
$container->addProvider(\Cable\View\TwigServiceProvider::class); $twig = $twig->with('test', 'hello world') ->make('index.html');
view: 'app/view' cache: 'storage/cache'