app/Http/Controllers/Auth/RegisterController.php
/**
     * Handle a registration request for the application.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Handle a registration request for the application.
Handle a registration request for the application .
public function register(Request $request)
    {
        if(auth()->user()->isAdmin()){
            $this->validator($request->all())->validate();
            event(new Registered($user = $this->create($request->all())));
            return $this->registered($request, $user)
                            ?: redirect($this->redirectPath());
        }
        else abort(404);
    }
public function register ( Request $ request ) { if ( auth ( ) -> user ( ) -> isAdmin ( ) ) { $ this -> validator ( $ request -> all ( ) ) -> validate ( ) ; event ( new Registered ( $ user = $ this -> create ( $ request -> all ( ) ) ) ) ; return $ this -> registered ( $ request , $ user ) ? : redirect ( $ this -> redirectPath ( ) ) ; } else abort ( 404 ) ; }
Handle a registration request for the application.
Handle a registration request for the application .
//$this->guard()->login($user);