当前位置: 首页>>代码示例>>PHP>>正文


PHP AUTH::user方法代码示例

本文整理汇总了PHP中AUTH::user方法的典型用法代码示例。如果您正苦于以下问题:PHP AUTH::user方法的具体用法?PHP AUTH::user怎么用?PHP AUTH::user使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AUTH的用法示例。


在下文中一共展示了AUTH::user方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: User

<?php

# archive.php
# 1. logic
AUTH::kickout('login');
$user = new User();
$user->load(AUTH::user());
$project = new Project();
$project->load(['slug' => Route::param('slug')]);
$projects = new Projects_Collection();
$projects->where(['deleted' => '1']);
$projects->where(['user_id' => AUTH::user_id()]);
$projects->get();
$tasks = new Tasks_Collection();
$tasks->where(['deleted' => '0']);
$tasks->where(['user_id' => AUTH::user_id()]);
$tasks->where(['project_id' => $project->id]);
$tasks->order_by('progress', 'ASC');
$tasks->get();
# 2. views
include VIEWS . 'header.php';
include VIEWS . 'archive.php';
include VIEWS . 'footer.php';
开发者ID:Wade-Nairn,项目名称:get-it-done-WE04,代码行数:23,代码来源:archive.php

示例2: e

"><?php 
        echo e($status->user->getNameOrUsername());
        ?>
</a></h4>
					        <p><?php 
        echo e($status->body);
        ?>
</p>
					        <ul class="list-inline">
					        	<!--Outputs the timestap it was created of the $status object creation time || WHAT IS diffForHumans?-->
					            <li><?php 
        echo e($status->created_at->diffForHumans());
        ?>
</li>
					            <?php 
        if ($status->user->id !== AUTH::user()->id) {
            ?>
					            <li><a href="<?php 
            echo e(route('status.like', ['statusId' => $status->id]));
            ?>
">Like</a></li>
					            <?php 
        }
        ?>
					            <li><?php 
        echo e($status->likes->count());
        ?>
 <?php 
        echo e(str_plural('like', $status->likes->count()));
        ?>
</li>
开发者ID:arnoldllanes,项目名称:Laravel,代码行数:31,代码来源:e68f4e700fa4fa219c62aed6290379783490e506.php

示例3: User

<?php

# home.php
# 1. logic
AUTH::kickout('login');
AUTH::user();
$user = new User();
$projects = new Projects_Collection();
$projects->where(['deleted' => '0']);
$projects->where(['user_id' => AUTH::user_id()]);
$projects->get();
# 2. views
include VIEWS . 'header.php';
include VIEWS . 'main.php';
include VIEWS . 'footer.php';
开发者ID:Wade-Nairn,项目名称:get-it-done-WE04,代码行数:15,代码来源:home.php


注:本文中的AUTH::user方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。