承接 sukohi/warp 相关项目开发

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

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

sukohi/warp

最新稳定版本:2.0.3

Composer 安装命令:

composer require sukohi/warp

包简介

A PHP package mainly developed for Laravel to remember URLs to redirect through session.

README 文档

README

A PHP package mainly developed for Laravel to remember URLs to redirect through session.
(This is for Laravel 5+. For Laravel 4.2)

Installation

Add this package name in composer.json

"require": {
  "sukohi/Warp": "2.*"
}

Execute composer command.

composer update

Register the service provider in app.php

'providers' => [
    ...Others...,  
    Sukohi\Warp\WarpServiceProvider::class,
]

Also alias

'aliases' => [
    ...Others...,  
    'Warp'   => Sukohi\Warp\Facades\Warp::class
]

Usage

\Warp::set('my_place');
\Warp::set('my_place', $current_url = '');  // or You can set URL you want to keep.


// After moving some pages 

$url = \Warp::get('my_place');
$url = \Warp::get('my_place', $alternative_url = 'http://example.com');    // You also can set alternative(default) URL.
$url = \Warp::get('my_place', $alternative_url, $forget_flag = true);      // If $forget_flag is false, URL you set will not be removed.

with Route name

Warp::set('your.route.name');   // the argument is optional. If in the case, route name automatically will be set.

// After moving some pages 

$url = Warp::route('your.route.name');

License

This package is licensed under the MIT License.

Copyright 2015 Sukohi Kuhoh

统计信息

  • 总下载量: 35
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-08