diff --git a/src/Pages/Template.php b/src/Pages/Template.php index 4f72fc8..ae9073b 100644 --- a/src/Pages/Template.php +++ b/src/Pages/Template.php @@ -162,6 +162,22 @@ function(Carbon $new, Carbon $current = null) { }); } + /** + * Force Fill the layout with an array of attributes. + * + * @param array $attributes + * @return $this + */ + public function forceFill(array $attributes) + { + foreach ($attributes as $key => $value) { + $attribute = \Str::replace('->', '.', $key); + \Arr::set($this->attributes, $attribute, $value); + } + + return $this; + } + /** * Create a new loaded template instance *