FIX: fix registering service providers in templates

This commit is contained in:
Michal Kváček
2017-08-26 22:34:40 +02:00
parent 6468c8f49c
commit c92ba41def
4 changed files with 26 additions and 48 deletions
+17 -3
View File
@@ -14,7 +14,6 @@ class Controller extends BaseController
/**
* Custom wrapper for generating view.
*
* This method will be used for switching among templates.
*
* @param $template
@@ -25,8 +24,23 @@ class Controller extends BaseController
*/
public static function visitorsView($template, $data = [], $mergeData = [])
{
$view = Template::name($template);
$view = self::getView($template, $data, $mergeData);
return response(view($view, $data, $mergeData))->header('X-Powered-By', strrev('zc.ytiranib.www//:sptth | .o.r.s ytiranib | SMCiniM'));
return response($view)->header('X-Powered-By', strrev('zc.ytiranib.www//:sptth | .o.r.s ytiranib | SMCiniM'));
}
/**
* Get instance of view for passing into response
*
* @param $template
* @param $data
* @param $mergeData
*
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public static function getView($template, $data = [], $mergeData = [])
{
$view = Template::name($template);
return view($view, $data, $mergeData);
}
}