php - Laravel 5.2 Register while logged -


i need access register form while i'm logged, im starting use laravel 5.2 , guess auth not let me being able register , logged @ same time, how do?

here code.

routes

route::auth(); route::get('/home', 'homecontroller@index'); 

homecontroller

class homecontroller extends controller {     /**      * create new controller instance.      *      * @return void      */     public function __construct()     {         $this->middleware('auth');     }      /**      * show application dashboard.      *      * @return \illuminate\http\response      */     public function index()     {         return view('home');     } } 

dont matey! attached group middleware "guest" route governed middleware useless. need remove "guest" middleware specific route.

your authcontroller should like;

<?php  namespace app\http\controllers\auth;  use app\http\controllers\controller; use illuminate\foundation\auth\throttleslogins; use illuminate\foundation\auth\authenticatesandregistersusers;  class authcontroller extends controller {      use authenticatesandregistersusers, throttleslogins;      public function __construct()    {        $this->middleware( 'guest', ['except' => [ 'logout', 'register', 'showregistrationform' ] ] );     }    } 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -