PHPackages                             krafthaus/bauhausblock - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. krafthaus/bauhausblock

ActiveLaravel-package

krafthaus/bauhausblock
======================

Simple block handling for laravel

026[1 issues](https://github.com/krafthaus/bauhausblock/issues)PHP

Since Sep 2Pushed 11y ago1 watchersCompare

[ Source](https://github.com/krafthaus/bauhausblock)[ Packagist](https://packagist.org/packages/krafthaus/bauhausblock)[ RSS](/packages/krafthaus-bauhausblock/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Bauhaus Block - Rendering of block elements
-------------------------------------------

[](#bauhaus-block---rendering-of-block-elements)

[![Latest Stable Version](https://camo.githubusercontent.com/e6c7fd906068eef0c111133201899e880a6ae961b193bf0ce6790094153487e9/68747470733a2f2f706f7365722e707567782e6f72672f6b72616674686175732f62617568617573626c6f636b2f762f737461626c652e706e67)](https://packagist.org/packages/krafthaus/bauhausblock)[![Latest Unstable Version](https://camo.githubusercontent.com/704dbf4e813891cbca631e338c0269379de5ab779e84f05df97358cf495248ce/68747470733a2f2f706f7365722e707567782e6f72672f6b72616674686175732f62617568617573626c6f636b2f762f756e737461626c652e706e67)](https://packagist.org/packages/krafthaus/bauhausblock)[![Total Downloads](https://camo.githubusercontent.com/d8e7ddb5898c34383939b0811857d3cb10130572fdd4263b9b0342ce727fae8d/68747470733a2f2f706f7365722e707567782e6f72672f6b72616674686175732f62617568617573626c6f636b2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/krafthaus/bauhausblock)[![License](https://camo.githubusercontent.com/54efbe62af5f4e118dd3dbd47a4cedab434962d0dd58d2d8279c109b2e17ed5d/68747470733a2f2f706f7365722e707567782e6f72672f6b72616674686175732f62617568617573626c6f636b2f6c6963656e73652e706e67)](https://packagist.org/packages/krafthaus/bauhausblock)

Handle rendering of block element. A block is a small unit with its own logic and templates. A block can be inserted anywhere in a current laravel template.

Installation
------------

[](#installation)

Add bauhaus block to your composer.json file:

```
"require": {
	"krafthaus/bauhausblock": "dev-master"
}

```

Use composer to install this package

```
$ composer update

```

Register the package
--------------------

[](#register-the-package)

```
'providers' => array(
	'KraftHaus\BauhausBlock\BauhausBlockServiceProvider'
),

'aliases' => array(
	'Block' => 'KraftHaus\BauhausBlock\Facades\Block'
)
```

Add the `blocks` folder to the `app/` directory and put the following line in your composer.json file:

```
"autoload": {
	"classmap": [
		"app/blocks"
	]
}

```

Then run `$ composer dump-autoload` and you're done.

Your first block
----------------

[](#your-first-block)

This quick tutorial explains how to create a RSS reader block. A block is nothing more than a class defining properties that renders a block partial.

Every block you create for your project should be located in the `app/blocks` folder. So lets create an `RssBlock.php` file in that folder with the following contents:

```
