larso/view

View class from Laravel Blade

Maintainers

Details

github.com/larsovn/view

Source

Issues

Installs: 19

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/larso/view

v1.1 2022-11-26 13:21 UTC

This package is auto-updated.

Last update: 2025-09-26 19:36:47 UTC


README

Install

composer require larso/view

Use

// index.php

use Larso\View\Blade;

require 'vendor/autoload.php';

$viewpath = __DIR__.'/views';
$cachepath = __DIR__.'/cache';

/**
 * @var \Illuminate\Contracts\View\Factory
 */
$blade = new Blade($viewpath, $cachepath);

echo $blade->make('hello')->with('name', 'YourName')->render();

Use with Facade

// index.php

use Larso\View\Blade;

require 'vendor/autoload.php';

$viewpath = __DIR__.'/views';
$cachepath = __DIR__.'/cache';

new Blade($viewpath, $cachepath);

View::share('share', 'This value Share');
echo View::make('hello')->with('name', 'MY NAME');