47 lines
1.3 KiB
PHP
47 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\CMS\Helpers\Template;
|
|
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
|
use Illuminate\Foundation\Bus\DispatchesJobs;
|
|
use Illuminate\Foundation\Validation\ValidatesRequests;
|
|
use Illuminate\Routing\Controller as BaseController;
|
|
|
|
class Controller extends BaseController
|
|
{
|
|
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
|
|
|
/**
|
|
* Custom wrapper for generating view.
|
|
* This method will be used for switching among templates.
|
|
*
|
|
* @param $template
|
|
* @param array $data
|
|
* @param array $mergeData
|
|
*
|
|
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
|
*/
|
|
public static function visitorsView($template, $data = [], $mergeData = [])
|
|
{
|
|
$view = self::getView($template, $data, $mergeData);
|
|
|
|
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);
|
|
}
|
|
}
|