dev-master
9999999-devIntegration of Laravel Blade Templating engine for Kohana Framework
BSD-3-Clause
The Requires
by Ilya Gudkov
blade templates kohana
Integration of Laravel Blade Templating engine for Kohana Framework
Laravel Blade Templating engine for Kohana 3.* Framework based on Philo Laravel-Blade standalone component, (*1)
add to your project by, (*2)
composer require pridemon/kohana-blade
then run composer install
, (*3)
Include Kohana blade integration into your kohana bootstrap.php
file, (*4)
Kohana::modules(array( 'blade' => MODPATH.'kohana-blade', ));
For a example, place Hello.blade.php
into application\views
directory, (*5)
@extends('layouts.master') @section('title', 'Page Title') @section('sidebar') @parent <p>This is appended to the master sidebar. {{ $value2 }}</p> @endsection @section('content')This is my body content. {{ $value }}, (*6)
@endsection
Now, you can write something like this in controllers actions:, (*7)
$value2 = 'foo'; $view = BladeView::factory('Hello'); $view->bind('value', $value); $view->set('value2', $value2); $value = 'bar'; $this->response->body($view->render());
Integration of Laravel Blade Templating engine for Kohana Framework
BSD-3-Clause
blade templates kohana