How to disable registration new users in Laravel

后端 未结 27 2845
鱼传尺愫
鱼传尺愫 2020-12-07 10:34

I\'m using Laravel (v5).

I need one user and I\'ve already registered that. Now I want to disable registration for new users. Of course, I need the login form to wor

27条回答
  •  自闭症患者
    2020-12-07 11:06

    In order not too change the code as it is, just create a middleware to detect if the request url is url('register'), then redirect to 404 or do wherever.

提交回复
热议问题