I currently have a very basic laravel app set up. I have simply started a laravel project with the auth extensions enables. I want to restrict users the ability to be able to register, as I only want admins to be able to register users. Does anyone have an example of this, where only an admin can register a new user? I already of roles set up. Thanks!
If you want to restrict register
you can do the following method on route
:
Change:
Auth::routes();
To,
Auth::routes(['register' => false]);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.