previous() public method

Get the URL for the previous request.
public previous ( mixed $fallback = false ) : string
$fallback mixed
return string
 public function __construct(UrlGenerator $url)
 {
     $this->middleware('auth');
     $this->middleware('permission:dashboard')->only('getIndex');
     $this->prev = $url->previous();
     $this->module = 'admin';
 }
Example #2
0
 /**
  * Get the URL for the previous request.
  *
  * @return string 
  * @static 
  */
 public static function previous()
 {
     return \Illuminate\Routing\UrlGenerator::previous();
 }
 public function __construct(UrlGenerator $url)
 {
     $this->prev = $url->previous();
 }
Example #4
0
 /**
  * Create a new redirect response to the previous location.
  *
  * @param  int    $status
  * @param  array  $headers
  * @param  string  $fallback
  * @return \Illuminate\Http\RedirectResponse
  */
 public function back($status = 302, $headers = [], $fallback = false)
 {
     $back = $this->generator->previous($fallback);
     return $this->createRedirect($back, $status, $headers);
 }
Example #5
0
 /**
  * Get the URL for the previous request.
  *
  * @param mixed $fallback
  * @return string 
  * @static 
  */
 public static function previous($fallback = false)
 {
     return \Illuminate\Routing\UrlGenerator::previous($fallback);
 }
 public function __construct(UrlGenerator $url)
 {
     $this->middleware('guest', ['except' => 'getLogout']);
     $this->prev = $url->previous();
 }
Example #7
0
 /**
  * Create a new redirect response to the previous location.
  *
  * @param  int    $status
  * @param  array  $headers
  * @return \Illuminate\Http\RedirectResponse
  */
 public function back($status = 302, $headers = array())
 {
     $back = $this->generator->previous();
     return $this->createRedirect($back, $status, $headers);
 }
Example #8
0
 /**
  * Show the application login form.
  *
  * @return \Illuminate\Http\Response
  */
 public function getLogin(UrlGenerator $urlGenerator, Request $request)
 {
     $redirectUrl = $this->redirectPath = $request->get('redirectUrl', $urlGenerator->previous());
     // common config
     $config = app('xe.config')->get('user.common');
     $loginRuleName = 'login';
     \XeFrontend::rule($loginRuleName, ['email' => 'required|email_prefix', 'password' => 'required']);
     return \XePresenter::make('login', compact('config', 'loginRuleName', 'redirectUrl'));
 }
 public function __construct(UrlGenerator $url)
 {
     $this->middleware('auth');
     $this->prev = $url->previous();
 }