本文整理汇总了PHP中UserController::create方法的典型用法代码示例。如果您正苦于以下问题:PHP UserController::create方法的具体用法?PHP UserController::create怎么用?PHP UserController::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserController
的用法示例。
在下文中一共展示了UserController::create方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
TaskController::markasdone($id);
});
$routes->get('/task/:id/markasundone', function ($id) {
TaskController::markasundone($id);
});
$routes->post('/login', function () {
SessionController::store();
});
$routes->get('/login', function () {
SessionController::create();
});
$routes->get('/logout', function () {
SessionController::destroy();
});
$routes->get('/signup', function () {
UserController::create();
});
$routes->post('/signup', function () {
UserController::store();
});
$routes->get('/user', function () {
UserController::index();
});
$routes->get('/user/:id', function ($id) {
UserController::show($id);
});
$routes->post('/user/:id', function ($id) {
UserController::update($id);
});
$routes->get('/user/:id/edit', function ($id) {
UserController::edit($id);
示例2: header
switch ($op) {
case 'login':
$username = $_POST['user'];
$password = $_POST['pass'];
if ($user_controller->login($username, $password) == 'true') {
header("Location:dashboard1.php");
} else {
header("Location:login.php?err=1");
}
break;
case 'register':
$usertype = $_POST['inputUsertype'];
$name = $_POST['inputText'];
$password = $_POST['inputPassword'];
$email = $_POST['inputEmail'];
if ($user_controller->create($usertype, $name, $password, $email) == false) {
header("Location:register.php?err=1");
} else {
header("Location:dashboard.php");
}
break;
case 'creategroup':
$name = $_POST['inputgroup'];
// $group_member=$_POST['member1'];
// $email=$_POST['email1'];
$createdby = $_POST['createdby'];
$email_id = $_POST['email_id'];
if ($user_controller->create_group($name, $createdby, $email_id) == false) {
header("Location:create_events.php?err=2");
} else {
header("Location:create_group.php?group={$name}&success=yes");