Authentication and user registration Laravel [closed]

0

Hello, I started working with Laravel 5.0 very soon and I have a slight doubt, by default Laravel 5.0 already comes with the Authentication and Registry part implemented, but I noticed that when I am logged in, I can not register No one.

I'd like to be able to register new users only when I'm logged in.

Ps. I've done a lot of research on the subject, I've been browsing AuthController but I did not have much success, I know it's a very quiet thing but I can not find a solution = /

    
asked by anonymous 24.02.2016 / 12:52

1 answer

0

Hello, after searching a lot, I found the answer in this forum: link

The forum user above @cancelik, gave this code as an example:

public function __construct()
{
    $this->middleware('guest', ['except' => ['getLogout', 'getRegister', 'postRegister']]);
}

which is to be added in the App / http / controllers / auth / AuthController.php controller builder

With this, a logged-in user can either view register.blade.php or register the data in the database.

    
24.02.2016 / 13:12