示例#1
0
文件: admin.php 项目: Rictus/CMS_Prod
    }
    //We do not want to check for new versions of anchor
    /*    Update::version();
    
            if (version_compare(Config::get('meta.update_version'), VERSION, '>')) {
                return Response::redirect('admin/upgrade');
            }
        */
    return Response::redirect('admin/accueil');
}));
/*
	Log out
*/
Route::get('admin/logout', function () {
    Auth::logout();
    Notify::notice(__('users.logout_notice'));
    return Response::redirect('admin/login');
});
/*
	Amnesia
*/
Route::get('admin/amnesia', array('before' => 'guest', 'main' => function () {
    $vars['messages'] = Notify::read();
    $vars['token'] = Csrf::token();
    return View::create('users/amnesia', $vars)->partial('header', 'partials/header')->partial('footer', 'partials/footer');
}));
Route::post('admin/amnesia', array('before' => 'csrf', 'main' => function () {
    $email = Input::get('email');
    $validator = new Validator(array('email' => $email));
    $query = User::where('email', '=', $email);
    $validator->add('valid', function ($email) use($query) {