本文整理汇总了PHP中Url::asset方法的典型用法代码示例。如果您正苦于以下问题:PHP Url::asset方法的具体用法?PHP Url::asset怎么用?PHP Url::asset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Url
的用法示例。
在下文中一共展示了Url::asset方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: enqueue
public static function enqueue($src = null, $container = 'head', $dependencies = null, $is_script = true)
{
if (!isset(static::$enqueued[$container])) {
static::$enqueued[$container] = array('js' => array(), 'css' => array());
}
static::$enqueued[$container][$is_script ? 'js' : 'css'][] = 0 === strpos($src, 'http') || 0 === strpos($src, '//') ? $src : Url::asset($src);
}
示例2:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><?php
echo Lang::get('cms::lang.page.not_found.label');
?>
</title>
<link href="<?php
echo Url::asset('/modules/system/assets/vendor/font-autumn/css/font-autumn.css');
?>
" rel="stylesheet">
<link href="<?php
echo Url::asset('/modules/system/assets/css/styles.css');
?>
" rel="stylesheet">
</head>
<body>
<div class="container">
<h1><i class="icon-chain-broken warning"></i> <?php
echo Lang::get('cms::lang.page.not_found.label');
?>
</h1>
<p class="lead"><?php
echo Lang::get('cms::lang.page.not_found.help');
?>
</p>
</div>
</body>
</html>
示例3:
">
<meta property="og:description" content="<?php
echo $description;
?>
">
<meta property="og:url" content="<?php
echo $canonical_url;
?>
">
<meta property="og:site_name" content="<?php
echo SITE_NAME;
?>
">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@emiliocobos95">
<meta name="twitter:creator" content="@emiliocobos95">
<link rel="stylesheet" type="text/css" href="<?php
echo Url::asset('css/style.css');
?>
">
</head>
<body class="<?php
echo PAGE_CONTROLLER;
?>
page-<?php
echo PAGE_ACTION;
?>
">
<div class="container">
示例4: e
?>
" rel="stylesheet">
<script src="<?php
echo Url::asset('/modules/system/assets/vendor/syntaxhighlighter/scripts/shCore.js');
?>
"></script>
<script src="<?php
echo Url::asset('/modules/system/assets/vendor/syntaxhighlighter/scripts/shBrushPhp.js');
?>
"></script>
<script src="<?php
echo Url::asset('/modules/system/assets/vendor/syntaxhighlighter/scripts/shBrushXml.js');
?>
"></script>
<link href="<?php
echo Url::asset('/modules/system/assets/vendor/syntaxhighlighter/styles/shCore.css');
?>
">
</head>
<body>
<div class="container">
<h1><i class="icon-power-off warning"></i> Error</h1>
<p class="lead">We're sorry, but an unhandled error occurred. Please see the details below.</p>
<div class="exception-name-block">
<div><?php
echo e($exception->getMessage());
?>
</div>
示例5: json_encode
<div class="span6 offset3">
<?php
if (IS_ADMIN) {
?>
<a href="<?php
echo Url::get('admin@logout');
?>
" class="logout">Cerrar sesión</a>
<?php
}
?>
<a href="<?php
echo Url::get();
?>
">Volver al inicio</a>
</div>
</footer>
</div>
<script>
window.adminAjaxUrl = <?php
echo json_encode(Url::get('admin@edit', 'delete-answer'));
?>
;
</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="<?php
echo Url::asset('admin/js/script.js');
?>
"></script>
</body>
</html>
示例6: getUrlAttribute
public function getUrlAttribute()
{
return Url::asset(config('media.config.files_directory') . $this->filename);
}
示例7:
echo $title;
?>
</title>
<meta name="robots" content="noindex, nofollow">
<link rel="stylesheet" href="<?php
echo Url::asset('admin/css/bootstrap.css');
?>
">
<link rel="stylesheet" href="<?php
echo Url::asset('admin/css/style.css');
?>
">
<script src="<?php
echo Url::asset('admin/js/modernizr.js');
?>
"></script>
</head>
<body>
<div class="navbar">
<div class="navbar-inner">
<a class="brand" href="<?php
echo Url::get('admin');
?>
">Administración</a>
<ul class="nav">
<li><a href="<?php
echo Url::get();
?>
" title="volver al inicio">Inicio</a></li>