本文整理汇总了PHP中dashboard_url函数的典型用法代码示例。如果您正苦于以下问题:PHP dashboard_url函数的具体用法?PHP dashboard_url怎么用?PHP dashboard_url使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dashboard_url函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getLinkAttribute
public function getLinkAttribute()
{
if ($this->type == 'public') {
return home_url('/article/' . $this->slug);
} else {
return dashboard_url('article/show/' . $this->slug);
}
}
示例2: check
public function check()
{
if (!sentinel()->check()) {
redirect('login', 'refresh');
}
if (!sentinel()->inRole($this->roles)) {
redirect(dashboard_url(), 'refresh');
}
}
示例3: index
public function index()
{
$this->form_validation->set_rules('email', 'Email', 'required|valid_email');
$this->form_validation->set_rules('password', 'Password', 'required');
if ($this->form_validation->run() == FALSE) {
keepValidationErrors();
$this->template->set_layout('login');
$this->template->build('login');
} else {
$credentials = ['email' => set_value('email'), 'password' => set_value('password')];
if (sentinel()->authenticate($credentials)) {
$redirect_url = dashboard_url();
redirect($redirect_url, 'refresh');
} else {
set_message_error('Email atau password Anda salah.');
redirect(login_url(), 'refresh');
}
}
}
示例4: get_header
<?php
get_header('private', array('active' => 'kelas'));
?>
<!-- start:main content -->
<div class="container content content-single content-dashboard content-kelas-online">
<section id="content">
<div class="content-kelas-online-main">
<!-- start:breadcrumb -->
<div class="breadcrumbs">
<ol class="breadcrumb">
<li><a href="<?php
echo dashboard_url();
?>
">Dashboard</a></li>
<li><a href="<?php
echo site_url();
?>
">Kelas Online</a></li>
<li><a href="<?php
echo site_url('course/show/' . $course->slug);
?>
"><?php
echo $course->name;
?>
</a></li>
<li><a href="<?php
echo site_url('course/showchapter/' . $course->slug . '/chapter-' . $chapter->order);
?>
"><?php
示例5: sentinel
?>
<ul class="nav navbar-nav pull-right">
<div class="dropdown dropdown-people">
<a class="dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="<?php
echo sentinel()->getUser()->avatar;
?>
" alt="">
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu2">
<a href="<?php
echo dashboard_url('profile');
?>
" class="dropdown-item">Profile</a>
<a href="<?php
echo dashboard_url('sendArticle');
?>
" class="dropdown-item">Artikel</a>
<a href="<?php
echo logout_url();
?>
" class="dropdown-item">Log Out</a>
</div>
</div>
</ul>
<?php
}
?>
</div>
</div>
</nav>
示例6: getLinkPrivateAttribute
public function getLinkPrivateAttribute()
{
return dashboard_url('category/show/' . $this->name);
}
示例7: check
public function check()
{
if (sentinel()->check()) {
redirect(dashboard_url(), 'refresh');
}
}
示例8: dashboard_url
<li><a href="<?php
echo dashboard_url();
?>
">Dashboard</a></li>
<li><a href="<?php
echo dashboard_url();
?>
">Article</a></li>
<?php
try {
?>
<?php
$category = $article->categories()->firstOrFail();
?>
<li><a href="<?php
echo dashboard_url('category/show/' . $category->name);
?>
"><?php
echo $category->name;
?>
</a></li>
<?php
} catch (Illuminate\Database\Eloquent\ModelNotFoundException $e) {
}
?>
</ol>
<div class="single-article-title">
<h1><?php
echo $article->title;
?>
</h1>