本文整理匯總了PHP中Bundle::assets方法的典型用法代碼示例。如果您正苦於以下問題:PHP Bundle::assets方法的具體用法?PHP Bundle::assets怎麽用?PHP Bundle::assets使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Bundle
的用法示例。
在下文中一共展示了Bundle::assets方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Log Viewer</title>
<link href="<?php
echo Bundle::assets('logviewer');
?>
style.css?1" rel="stylesheet" type="text/css">
</head>
<body>
<header class="container-fluid">
<h1>Laravel Log Viewer</h1>
</header>
<div class="container-fluid">
<div class="row-fluid">
<div class="span3">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">Log Files</li>
<?php
if ($files) {
?>
<?php
foreach ($files as $file) {
?>
<?php
示例2: path
/**
* Returns the full-path for an asset.
*
* @param string $source
* @return string
*/
public function path($source)
{
return Bundle::assets($this->bundle) . $source;
}
示例3: testAssetPathReturnsPathToBundlesAssets
/**
* Test the Bundle::asset method.
*
* @group laravel
*/
public function testAssetPathReturnsPathToBundlesAssets()
{
$this->assertEquals('/bundles/dashboard/', Bundle::assets('dashboard'));
$this->assertEquals('/', Bundle::assets(DEFAULT_BUNDLE));
Config::set('application.url', '');
}