承接 yiier/yii2-return-url 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

yiier/yii2-return-url

最新稳定版本:v1.1.0

Composer 安装命令:

composer require yiier/yii2-return-url

包简介

Keeps current URL in session for login actions so we can return to it if needed.

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License

Keeps current URL in session for login actions so we can return to it if needed.

中文说明:登录之后自动跳转登录之前的页面

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist yiier/yii2-return-url "*"

or add

"yiier/yii2-return-url": "*"

to the require section of your composer.json file.

Usage

Method One (方式一,推荐)

you need to include it in config:

return [
    'on beforeAction' => function ($event) {
        Yii::createObject([
            'class' => \yiier\returnUrl\ReturnUrl::class,
            'uniqueIds' => ['site/qrcode', 'site/login', 'site/signup']
        ])->beforeAction();
    },
    'components' => [
    ]
];

Method Two (方式二)

In your controller add ReturnUrl filter to behaviors:

public function behaviors()
{
    return [
        'returnUrl' => [
            'class' => 'yiier\returnUrl\ReturnUrl',
            'uniqueIds' => ['site/qrcode', 'site/login', 'user/security/auth'] // 过滤掉不需要的 controller/action
        ],
    ];
}

For access to previously visited url:

Yii::$app->user->getReturnUrl();

统计信息

  • 总下载量: 9.2k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 4
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 1
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2016-03-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固