Giter Club home page Giter Club logo

codeigniter-blade's Introduction

This class is a port of Laravel's blade templating system for CodeIgniter framework. 

It's compatible with Modular Extensions - HMVC and it uses the file cache for store compiled templates.

To install simply put the file into application/libraries and make sure that application/cache folder is writable.

By default template views must have .blade.php as extension. You can change this in $blade_ext class property.

Example usage in a controller:

	class Test extends MX_Controller
	{

		public function __construct()
		{
			parent::__construct();
			$this->load->library('blade');
		}	
	
		public function index()
		{
			// renders /views/test.blade.php or /modules/test/views/test.blade.php
		
			$this->blade->set('foo', 'bar')
				->set('an_array', array(1, 2, 3, 4))
				->append('an_array', 5)
				->set_data(array('more' => 'data', 'other' => 'data'))
				->render('test', array('message' => 'Hello World!'));
		}
	
	}

See the docs on http://laravel.com/docs/views/templating

codeigniter-blade's People

Contributors

laperla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codeigniter-blade's Issues

how to get view after render

hi

in codeigniter we can load and fetch view by adding a true boolean value. for examole :

       $loaded_view = $this->load->view('test',$data,true);

in this library there is no this option .

@extends not working

Hello

The library works, but trying an extend failed.

The section is not showing up, but the @extends clause is sent to the browser

main.blade.php Code:

@extends('global/skeleton')

@section('body')

Content goes here yo

@endsection

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.