library propel-laravel
Make Propel models work with Laravel Form::model() without making it an array
stephangroen/propel-laravel
Make Propel models work with Laravel Form::model() without making it an array
- Tuesday, March 10, 2015
- by stephangroen
- Repository
- 1 Watchers
- 3 Stars
- 38 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 2 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
propel-laravel
Make Propel models work with Laravel Form::model() without making it an array., (*1)
Implements ArrayAccess so Laravel can check for set properties and adds __isset() and __get() on the model to help
Laravel get the data., (*2)
All data with __get() uses the normal Propel getters. Checks are in place for normal column names and PhpNames., (*3)
Usage
build.properties
propel.behavior.laravelmodel.class = path.to.LaravelModelBehavior
schema.xml
<database name="mydatabase" defaultIdMethod="native">
<behavior name="laravelmodel" />
....
</database>
Integrating Propel in Laravel 4
Here is a tutorial on how to integrate Propel in Laravel 4., (*4)