Package Data | |
---|---|
Maintainer Username: | Sukohi |
Maintainer Contact: | capilano.sukohi@gmail.com (Sukohi) |
Package Create Date: | 2015-06-08 |
Package Last Update: | 2016-04-18 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-18 03:05:23 |
Package Statistics | |
---|---|
Total Downloads: | 34 |
Monthly Downloads: | 2 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
A PHP package mainly developed for Laravel to remember URLs to redirect through session.
(This is for Laravel 5+. For Laravel 4.2)
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
]
\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.
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');
This package is licensed under the MIT License.
Copyright 2015 Sukohi Kuhoh