Laravel 5:覆盖注册页面的默认视图 [英] Laravel 5: override the default view for Registration page

查看:54
本文介绍了Laravel 5:覆盖注册页面的默认视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将身份验证过程更改为使用其他视图模板.例如.代替 resources/views/auth/register.blade.php ,应使用 resources/views/register.blade.php .

I want to change the auth process to use another view template. E.g. instead of resources/views/auth/register.blade.php it shall be used resources/views/register.blade.php.

但是我很难找到调用该视图的代码.

But I struggle to find the code where this view is called.

我发现的唯一位置是在 app/Services/Register 中,但前提是验证程序失败.在默认情况下调用视图时,我需要一个地方.

The only place I found was in app/Services/Register but only if the validators fails. I need the place when the view is called per default.

推荐答案

在AuthController中,您可以像这样覆盖方法 getRegister()方法:

In AuthController, you can overwrite the method getRegister() method like this :

public function getRegister()
{
   return view('register');
}

将此代码放在您的AuthController中.

Put this code in your AuthController.

这篇关于Laravel 5:覆盖注册页面的默认视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆