App\Http\Middleware\LoginAs::canLoginAs PHP Method

canLoginAs() protected method

protected canLoginAs ( ) : boolean
return boolean
    protected function canLoginAs() : bool
    {
        // Just to be sure...
        if (!app()->environment('local')) {
            return false;
        }
        if (!ends_with(request()->getHost(), '.dev')) {
            return false;
        }
        if (!in_array(env('DB_USERNAME'), ['homestead', 'root'])) {
            return false;
        }
        return true;
    }