Skip to content

Listener not show result #2719

Closed Answered by uluumbch
uluumbch asked this question in Q&A
Oct 1, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

nevermind guys, I think the docs have some issue, I just change the handle function
before

 public function handle(Repository $repository, Request $request): Repository
    {
        [$minuend, $subtrahend] = $request->all();

        return $repository
            ->set('minuend', $minuend)
            ->set('subtrahend', $subtrahend)
            ->set('result', $minuend - $subtrahend);
    }

after

 public function handle(Repository $repository, Request $request): Repository
    {
        $minuend = $request->get('minuend', 0);
        $subtrahend = $request->get('subtrahend', 0);

        return $repository
            ->set('minuend', $minuend)
            ->set('subtrahend', $subtrah…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RuLeiFei
Comment options

Answer selected by uluumbch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants