I want to have project with:
- Laravel 5
- Twig template engine
- trans tag in Twig, which works with standard Laravel translations (based on php arrays)
Here is my composer.json:
"require": {
"laravel/framework": "5.1.*",
"rcrowe/TwigBridge": "~0.8.1"
}
app.php:
'providers' => [
// ...
TwigBridge\ServiceProvider::class,
// ...
]
'aliases' => [
'Twig' => TwigBridge\Facade\Twig::class,
],
Here is my controller:
class Page extends Controller
{
public function home()
{
$name = 'Guest';
return Twig::render('twig.twig', compact('name'));
}
}
But I have this error:
ReflectionException in Container.php line 736:
Class view does not exist