Skip to content

CableFramework/View

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

View

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'

About

View Library For Cable Framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages