PHPackages                             packettide/bree - 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. [Database &amp; ORM](/categories/database)
4. /
5. packettide/bree

ActiveLibrary[Database &amp; ORM](/categories/database)

packettide/bree
===============

A form layer for Eloquent which supports a variety of field packages

v1.1.2(12y ago)152842MITPHPPHP &gt;=5.3.0

Since Dec 14Pushed 12y ago3 watchersCompare

[ Source](https://github.com/packettide/bree)[ Packagist](https://packagist.org/packages/packettide/bree)[ RSS](/packages/packettide-bree/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (6)Versions (11)Used By (0)

[![bree](https://camo.githubusercontent.com/1bea13311184347fa84d21e4b05651cdb8be90d08e86dee31104a6267d43e9ef/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3536333939362f313732373131352f64663862356165302d363239392d313165332d383732382d6136313937306235383131332e706e67)](https://camo.githubusercontent.com/1bea13311184347fa84d21e4b05651cdb8be90d08e86dee31104a6267d43e9ef/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3536333939362f313732373131352f64663862356165302d363239392d313165332d383732382d6136313937306235383131332e706e67)

\#Bree

Bree provides an interface to associate fieldtypes with existing Eloquent model attributes.

*This project is still in an early stage and breaking changes may be made.*

[![Build Status](https://camo.githubusercontent.com/a6bbef5ddf3b4354b263ca94acc44bf90ebb50287399d0b20e60d872e9abf750/68747470733a2f2f7472617669732d63692e6f72672f7061636b6574746964652f627265652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/packettide/bree)

\##Installation

With Laravel 4 and Composer

1. Add `"packettide/bree": "1.x"` to your 'require' block in composer.json
2. Run `composer update`
3. Add `'Packettide\Bree\BreeServiceProvider',` to the $providers array in app/config/app.php
4. Then publish all Bree assets - `php artisan bree:assets`

\##Basic Usage

In this section we'll cover the fundamentals of how to interact with Bree. Bree functions by wrapping an existing Eloquent model and attaching field definitions to model attributes.

### Defining Bree fields within routes/controllers

[](#defining-bree-fields-within-routescontrollers)

```
$book = new Bree('Book', array(
			'title'  => array('type' => 'Text')
		));

```

### Defining Bree fields within Eloquent Models

[](#defining-bree-fields-within-eloquent-models)

In app/models/Book.php

```
