Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Ek committed Jan 15, 2016
1 parent 467dce9 commit 763b8c7
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://packagist.org/packages/ekandreas/bladerunner)
[![Build Status](https://travis-ci.org/ekandreas/bladerunner.svg?branch=master)](https://travis-ci.org/ekandreas/bladerunner)
[![StyleCI](https://styleci.io/repos/48002506/shield)](https://styleci.io/repos/48002506)
[![Twitter Follow](https://img.shields.io/twitter/follow/shields_io.svg?style=social)](https://twitter.com/intent/user?screen_name=aekabse)


WordPress plugin for Laravel Blade templating.

Expand All @@ -13,7 +16,7 @@ composer require ekandreas/bladerunner:*
Activate the plugin inside WordPress and templates with *.blade.php are inspected and active.
Your theme still needs an index.php due to WordPress basic functionality. When removed the theme is known as broken.

If you don't use a composer based WordPress development environment you can download the latest distributed plugin at [Bladerunner site](http://bladerunner.aekab.se) and install it the common way with zip upload to WordPress via wp-admin.
If you don't use a composer based WordPress development environment you can download the latest distributed plugin at [Bladerunner site http://bladerunner.aekab.se](http://bladerunner.aekab.se) and install it the common way with zip upload to WordPress via wp-admin.

## Hello World
1. Install the library with composer
Expand All @@ -38,12 +41,25 @@ https://laravel.com/docs/5.2/blade
* Your views must be placed within your theme folder.
* Your templates must have .blade.php extension.

## Pass data to template
A simple way to pass data to a view before it's loaded.

Run the below code (and change variableName and $value) before the template_include filter (or in the template_include filter with higher priority than 999) to pass data to the soon to be loaded view.
```
\Bladerunner\Template::$data['variableName'] = $value;
```

Inside your view file you will be able to access the passed data like so:
```
{{ $variableName }}
```

## Links
* [Bladerunner site with documentation and distro](http://bladerunner.aekab.se)
* [Docs Laravel Blade v5.2](https://laravel.com/docs/5.2/blade)
* [Packagist](https://packagist.org/packages/ekandreas/bladerunner)
* [Code repo at Github](https://github.com/ekandreas/bladerunner)
* [Support / Issues](https://github.com/ekandreas/bladerunner/issues)
* [Get a WordPress zip distro](http://bladerunner.aekab.se)

## Tests

Expand Down

0 comments on commit 763b8c7

Please sign in to comment.