Я нашел решение, расширив BladeCompiler.
<?php namespace Laravel\Enhanced;
use Illuminate\View\Compilers\BladeCompiler as LaravelBladeCompiler;
class BladeCompiler extends LaravelBladeCompiler {
/**
* Compile blade template with passing arguments.
*
* @param string $value HTML-code including blade
* @param array $args Array of values used in blade
* @return string
*/
public function compileWiths($value, array $args = array())
{
$generated = parent::compileString($value);
ob_start() and extract($args, EXTR_SKIP);
// We'll include the view contents for parsing within a catcher
// so we can avoid any WSOD errors. If an exception occurs we
// will throw it out to the exception handler.
try
{
eval('?>'.$generated);
}
// If we caught an exception, we'll silently flush the output
// buffer so that no partially rendered views get thrown out
// to the client and confuse the user with junk.
catch (\Exception $e)
{
ob_get_clean(); throw $e;
}
$content = ob_get_clean();
return $content;
}
}
Из http://msdn.microsoft.com/en-us/library/ms187107%28v=sql.90%29.aspx :
порядок атрибутов XML не сохраняется. Когда вы запрашиваете экземпляр XML, хранящийся в столбце типа xml, порядок атрибутов в результирующем XML может отличаться от исходного экземпляра XML.
blockquote>Таким образом, даже если вы могли бы выяснить способ сортировки атрибутов, вы не можете доверять тому, что тип данных XML в SQL Server сохранит нужный вам порядок.