mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
43e57d0117
* minor fix for payment notifications * styleci * Limit Self updating to self hosters only : * Fixes for designs * Minor fixes for self-update
44 lines
1.2 KiB
PHP
44 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* Invoice Ninja (https://invoiceninja.com)
|
|
*
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
*
|
|
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
|
|
*
|
|
* @license https://opensource.org/licenses/AAL
|
|
*/
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Utils\Traits\UserSessionAttributes;
|
|
use Illuminate\Foundation\Bus\DispatchesJobs;
|
|
use Illuminate\Routing\Controller as BaseController;
|
|
use Illuminate\Foundation\Validation\ValidatesRequests;
|
|
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
|
|
|
class Controller extends BaseController
|
|
{
|
|
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
|
|
|
/**
|
|
* @param string $path
|
|
* @param array $options
|
|
*
|
|
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
|
*/
|
|
public function render(string $path, array $options = [])
|
|
{
|
|
$theme = array_key_exists('theme', $options) ? $options['theme'] : 'ninja2020';
|
|
|
|
if (array_key_exists('root', $options)) {
|
|
return view(
|
|
sprintf('%s.%s.%s', $options['root'], $theme, $path),
|
|
$options
|
|
);
|
|
}
|
|
|
|
return view("portal.$theme.$path", $options);
|
|
}
|
|
}
|