Skip to content
Discussion options

You must be logged in to vote

Guess I should have dug a bit deeper, I figured it out, here is the solution I came up with:

    public static function authorize(): bool
    {
        $userId = (int) request()->route('userId');

        return $userId === Auth::user()->id;
    }

hopefully it helps someone else ☺️

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by elomonaco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant