本文整理汇总了PHP中AUTH::kickout方法的典型用法代码示例。如果您正苦于以下问题:PHP AUTH::kickout方法的具体用法?PHP AUTH::kickout怎么用?PHP AUTH::kickout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AUTH
的用法示例。
在下文中一共展示了AUTH::kickout方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strtolower
<?php
# new_project.php
# 1. logic
AUTH::kickout('login');
$projects = new Projects_Collection();
$projects->where(['deleted' => '0']);
$projects->where(['user_id' => AUTH::user_id()]);
$projects->get();
if (Input::posted()) {
$slug = Input::get('project_name');
$slug = strtolower($slug);
$slug = explode(" ", $slug);
$slug = implode("-", $slug);
$deadline = Input::get('deadline');
$deadline = intval($deadline);
$project = new project();
$project->fill(Input::all());
$project->date = date('Y-m-d H:i:s');
$project->slug = $slug;
$project->user_id = Auth::user_id();
if (Input::get('project_name') != "" || Input::get('project_description') != "") {
$project->save();
URL::redirect('/' . $project->slug);
}
URL::redirect('/new_project');
}
$title = 'New Project';
# 2. views
include VIEWS . 'header.php';
include VIEWS . 'new_project.php';