'Extends basic auth laravel

Can i expand the login function in Laravel version 5 and higher without overwriting the standard one. I want to expand the functionality without getting into the vendor folder enter image description here

class AuthController extends Controller
{

use AuthenticatesAndRegistersUsers, ThrottlesLogins;

/**
 * Where to redirect users after login / registration.
 *
 * @var string
 */
protected $redirectTo = '/'; // home initialement
protected $redirectAfterLogout = '/login'; // Added

/**
 * Create a new authentication controller instance.
 *
 * @return void
 */
public function __construct()
{
    $this->middleware('guest', ['except' => ['logout', 'getLogout']]);
}

/**
 * Get a validator for an incoming registration request.
 *
 * @param  array  $data
 * @return \Illuminate\Contracts\Validation\Validator
 */
protected function validator(array $data)
{
    //
}

/**
 * Create a new user instance after a valid registration.
 *
 * @param  array  $data
 * @return User
 */
protected function create(array $data)
{
    //
}

protected function login(array $data)
{
    // my changes here...
}
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source