Skip to content

Conversation

@ChinaMoli
Copy link

@ChinaMoli ChinaMoli commented Aug 26, 2025

When using VSCode with the laravel/vs-code-extension plugin installed, the plugin automatically determines and modifies the return value of Auth::user() to the corresponding model (\App\Models\User)

However, \Tymon\JWTAuth\JWTGuard::user() duplicates the return value, causing the return value modified by the plug-in to not take effect, so this PR modifies the comment of the user() method so that it inherits from the document.

laravel/vs-code-extension added file

// vendor/_laravel_ide/_auth.php
<?php

namespace Illuminate\Contracts\Auth;

interface Guard
{
    /**
     * @return \App\Models\User|null
     */
    public function user();
}

Before modification

image

After modification

image

@ChinaMoli ChinaMoli changed the title feat: Remove return type chore: Inherit Doc Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant