1 | <?php |
||
8 | class Redirect |
||
9 | { |
||
10 | /** |
||
11 | * To the last visited page before user logged in (useful when people are on a certain page inside your application |
||
12 | * and then want to log in (to edit or comment something for example) and don't to be redirected to the main page). |
||
13 | * |
||
14 | * This is just a bulletproof version of Redirect::to(), redirecting to an ABSOLUTE URL path like |
||
15 | * "http://www.mydomain.com/user/profile", useful as people had problems with the RELATIVE URL path generated |
||
16 | * by Redirect::to() when using HUGE inside sub-folders. |
||
17 | * |
||
18 | * @param $path string |
||
19 | */ |
||
20 | public static function toPreviousViewedPageAfterLogin($path) |
||
24 | |||
25 | /** |
||
26 | * To the homepage |
||
27 | */ |
||
28 | public static function home() |
||
32 | |||
33 | /** |
||
34 | * To the defined page, uses a relative path (like "user/profile") |
||
35 | * |
||
36 | * Redirects to a RELATIVE path, like "user/profile" (which works very fine unless you are using HUGE inside tricky |
||
37 | * sub-folder structures) |
||
38 | * |
||
39 | * @see https://github.com/panique/huge/issues/770 |
||
40 | * @see https://github.com/panique/huge/issues/754 |
||
41 | * |
||
42 | * @param $path string |
||
43 | */ |
||
44 | public static function to($path) |
||
48 | } |
||
49 |