Skip to content

Commit a1dc0f2

Browse files
authored
Added ability to get the view instance
1 parent 15d7708 commit a1dc0f2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/BemComponent.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,5 +140,19 @@ public function modifiers(array $modifiers, $overwrite = false)
140140

141141
$this->modifiers = array_merge($this->getModifiers(), $modifiers);
142142
}
143+
144+
145+
/**
146+
* Get the view instance
147+
*
148+
* @return \Illuminate\Contracts\View\View
149+
*/
150+
public function view()
151+
{
152+
$view = $this->resolveView();
153+
$view->with($this->data());
154+
155+
return $view;
156+
}
143157

144158
}

0 commit comments

Comments
 (0)