本文整理汇总了PHP中Frontend::js方法的典型用法代码示例。如果您正苦于以下问题:PHP Frontend::js方法的具体用法?PHP Frontend::js怎么用?PHP Frontend::js使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Frontend
的用法示例。
在下文中一共展示了Frontend::js方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: makeView
/**
* makeView
*
* @param $target
* @param $instanceId
* @param $mode
*
* @return \Illuminate\Contracts\View\View
*/
protected function makeView($target, $instanceId, $mode)
{
/** @var SkinHandler $skinHandler */
$skinHandler = app('xe.skin');
$skinInstanceId = $skinHandler->mergeKey($target, $instanceId);
$selectedSkin = $skinHandler->getAssigned([$target, $instanceId], $mode);
if ($selectedSkin !== null) {
$settingView = $selectedSkin->getSettingView();
} else {
$settingView = null;
}
// get skin list
$skinList = $skinHandler->getList($target);
$skins = function ($skinList, $selectedSkin) {
(yield ['text' => '선택하세요', 'selected' => false]);
foreach ($skinList as $id => $skin) {
$support = [];
$support[] = $skin->supportDesktop() ? '데스크탑' : '';
$support[] = $skin->supportMobile() ? '모바일' : '';
$support = '[' . implode('|', $support) . ']';
(yield ['value' => $id, 'text' => $skin->getTitle() . $support, 'selected' => $selectedSkin === null ? false : $id === $selectedSkin->getId()]);
}
};
$skins = $skins($skinList, $selectedSkin);
\Frontend::js('assets/skin/section.js')->load();
$url = route('settings.skin.section.setting');
\Frontend::html('skin.loadSkinSetting')->content("<script>\n XE.\$(function(\$){\n \$('.__xe_skinSetting').xeSkinSetting({\n 'loadUrl': '{$url}',\n 'saveUrl': '{$url}'\n });\n });\n </script>")->load();
return View::make('skin.setting', compact('skinInstanceId', 'settingView', 'skins', 'mode', 'selectedSkin'));
}
示例2: loadAssets
/**
* loadAssets
*
* @return void
*/
protected function loadAssets()
{
\Frontend::css(['assets/vendor/bootstrap/css/bootstrap.css', 'assets/common/css/form.css', 'assets/member/auth.css'])->load();
\Frontend::js('assets/vendor/bootstrap/js/bootstrap.js')->min('assets/vendor/bootstrap/js/bootstrap.min.js')->appendTo('head')->load();
}