Skip to content

Commit

Permalink
Added ability to get the view instance
Browse files Browse the repository at this point in the history
  • Loading branch information
voidgraphics authored Nov 18, 2020
1 parent 15d7708 commit a1dc0f2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/BemComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,19 @@ public function modifiers(array $modifiers, $overwrite = false)

$this->modifiers = array_merge($this->getModifiers(), $modifiers);
}


/**
* Get the view instance
*
* @return \Illuminate\Contracts\View\View
*/
public function view()
{
$view = $this->resolveView();
$view->with($this->data());

return $view;
}

}

0 comments on commit a1dc0f2

Please sign in to comment.