initial commit of laravel!

This commit is contained in:
Taylor Otwell
2011-06-08 23:45:08 -05:00
commit a188d62105
70 changed files with 6942 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php namespace System\DB\Eloquent;
class Factory {
/**
* Factory for creating new model instances.
*
* @param string $class
* @return object
*/
public static function make($class)
{
// -----------------------------------------------------
// Create a new model instance.
// -----------------------------------------------------
$model = new $class;
// -----------------------------------------------------
// Set the active query instance on the model.
// -----------------------------------------------------
$model->query = \System\DB\Query::table(Meta::table($class));
return $model;
}
}