本文整理汇总了PHP中Illuminate\Routing\UrlGenerator::previous方法的典型用法代码示例。如果您正苦于以下问题:PHP UrlGenerator::previous方法的具体用法?PHP UrlGenerator::previous怎么用?PHP UrlGenerator::previous使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Routing\UrlGenerator
的用法示例。
在下文中一共展示了UrlGenerator::previous方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(UrlGenerator $url)
{
$this->middleware('auth');
$this->middleware('permission:dashboard')->only('getIndex');
$this->prev = $url->previous();
$this->module = 'admin';
}
示例2: previous
/**
* Get the URL for the previous request.
*
* @return string
* @static
*/
public static function previous()
{
return \Illuminate\Routing\UrlGenerator::previous();
}
示例3: __construct
public function __construct(UrlGenerator $url)
{
$this->prev = $url->previous();
}
示例4: back
/**
* 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);
}
示例5: previous
/**
* 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);
}
示例6: __construct
public function __construct(UrlGenerator $url)
{
$this->middleware('guest', ['except' => 'getLogout']);
$this->prev = $url->previous();
}
示例7: back
/**
* 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);
}
示例8: getLogin
/**
* 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'));
}
示例9: __construct
public function __construct(UrlGenerator $url)
{
$this->middleware('auth');
$this->prev = $url->previous();
}