Skip to content
This repository has been archived by the owner on Dec 4, 2019. It is now read-only.

Commit

Permalink
Allow for data to be passed to the view.
Browse files Browse the repository at this point in the history
  • Loading branch information
franzliedke committed Jun 24, 2014
1 parent 74d014b commit 4571c4f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/FluxBB/Actions/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,19 @@

abstract class Page extends Base
{
/**
* @var string
*/
protected $viewName = '';

/**
* @var array
*/
protected $data = [];

/**
* @var \Illuminate\View\Factory
*/
protected $view;


Expand All @@ -18,6 +29,6 @@ public function __construct(Factory $view)

protected function makeResponse()
{
return $this->view->make($this->viewName);
return $this->view->make($this->viewName, $this->data);
}
}

0 comments on commit 4571c4f

Please sign in to comment.