GithubHelp home page GithubHelp logo

samnan / koseven-blade Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pridemon/kohana-blade

0.0 2.0 0.0 177 KB

Laravel Blade Template engine for Kohana Framework

PHP 100.00%
koseven template-engine views kohana

koseven-blade's Introduction

Kohana Blade

Laravel Blade Templating engine for Kohana 3.* Framework based on Philo Laravel-Blade standalone component

#Installation

add to your project by

composer require pridemon/kohana-blade

then run composer install

Include Kohana blade integration into your kohana bootstrap.php file

Kohana::modules(array(
  
     'blade'        => MODPATH.'kohana-blade',

	));

Usage

For a example, place Hello.blade.php into application\views directory

@extends('layouts.master')

@section('title', 'Page Title')

@section('sidebar')
    @parent

    <p>This is appended to the master sidebar. {{ $value2 }}</p>
@endsection

@section('content')
    <p>This is my body content. {{ $value }}</p>
@endsection

Now, you can write something like this in controllers actions:

$value2 = 'foo';

$view = BladeView::factory('Hello');

$view->bind('value', $value);
$view->set('value2', $value2);
$value = 'bar';

$this->response->body($view->render());

koseven-blade's People

Contributors

pridemon avatar ramonsmit avatar

Watchers

James Cloos avatar Samnan ur Rehman Akhoond avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.