public static function create($attributes, $validate = true, $guardAttributes=true)
	{
		// Get class and instantiate it
		$className = get_called_class();
		$model = new $className($attributes, $guardAttributes);
		$model->save($validate);
		return $model;
	}
public static function create($attributes, $validate = true, $guardAttributes=true)
	{
		// Get class and instantiate it
		$className = get_called_class();
		$model = new $className($attributes, $guardAttributes);
		$model->save($validate);
		return $model;
	}
public static function create ( $ attributes , $ validate = true , $ guardAttributes = true ) { // Get class and instantiate it $ className = get_called_class ( ) ; $ model = new $ className ( $ attributes , $ guardAttributes ) ; $ model -> save ( $ validate ) ; return $ model ; }
Creates a model and saves it to the database.

@param array $attributes Array of the models attributes
@param boolean $validate True if the validators should be run
@param boolean $guard_attributes Set to true to guard protected/non-accessible attributes
@return Model
Creates a model and saves it to the database .