[英]What is auth.authenticate view in laravel 5.2 auth
What is the use of auth.authenticate
view, as there is no file under the auth direcirectory named "authenticate", also what is loginView
here? auth.authenticate
视图的用途是什么,因为auth目录下没有名为“ authenticate”的文件,这里的loginView
是什么?
As mentioned in this code: 如该代码中所述:
public function showLoginForm()
{
$view = property_exists($this, 'loginView')
? $this->loginView : 'auth.authenticate';
if (view()->exists($view)) {
return view($view);
}
return view('auth.signin');
}
This is the auth trait ( AuthenticatesUsers
), you can overwrite the default view for it. 这是auth特性(
AuthenticatesUsers
),您可以覆盖它的默认视图。 You can overwrite more things like: redirect url when the auth is a success, failure url etc. 您可以覆盖更多内容,例如:验证成功时重定向url,失败url等。
So that code can be translated to: 这样该代码可以转换为:
if the property
loginView
exists then the viewloginView
will be loaded, elseauth.authenticate
ifauth.authenticate
exists then load it elseauth.signin
如果属性
loginView
存在,则将加载视图loginView
,否则auth.authenticate
如果auth.authenticate
存在,则将其加载,否则auth.signin
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.