本文整理匯總了PHP中helpers\Url::base方法的典型用法代碼示例。如果您正苦於以下問題:PHP Url::base方法的具體用法?PHP Url::base怎麽用?PHP Url::base使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類helpers\Url
的用法示例。
在下文中一共展示了Url::base方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
</head>
<body>
<div id="wrapper">
<?php
if (App::$user->isSigned()) {
$items = [['label' => 'Profile', 'url' => Url::base('admin/profile/index'), 'logo' => 'fa fa-user', 'route' => ['/admin', '/admin/profile', '/admin/profile/index']], ['label' => 'Users', 'url' => Url::base('admin/user/index'), 'logo' => 'fa fa-users', 'route' => ['/admin/user', '/admin/user/index']], ['label' => 'Logout (' . App::$user->Username . ')', 'url' => Url::base('site/logout'), 'logo' => 'fa fa-sign-out']];
} else {
$items = [['label' => 'Home', 'url' => Url::base(), 'logo' => 'fa fa-home', 'route' => ['/', '/site', '/site/index']], ['label' => 'About', 'url' => Url::base('site/about'), 'logo' => 'fa fa-info-circle', 'route' => '/site/about'], ['label' => 'Login', 'url' => Url::base('site/login'), 'logo' => 'fa fa-sign-in', 'route' => '/site/login'], ['label' => 'Register', 'url' => Url::base('site/register'), 'logo' => 'fa fa-user', 'route' => '/site/register']];
}
?>
<?php
echo Sidebar::begin(['label' => App::config()->name, 'url' => Url::base(), 'items' => $items]);
?>
<div id="page-content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12 main-content">
<?php
echo $this->getBreadcrumb();
?>
<?php
echo $this->getAlert();
?>
<?php
require $__content;
?>