rewrote validation library.

This commit is contained in:
Taylor Otwell
2011-07-12 20:04:14 -05:00
parent bbc45f92b7
commit c3b8524e1b
22 changed files with 508 additions and 1236 deletions

View File

@@ -83,6 +83,17 @@ abstract class Eloquent {
* @return void
*/
public function __construct($attributes = array())
{
$this->fill($attributes);
}
/**
* Set the attributes of the model using an array.
*
* @param array $attributes
* @return void
*/
public function fill($attributes)
{
foreach ($attributes as $key => $value)
{