Skip to content

it don't work with quickstart, it return 404 not found, my route not correct ? #33

Description

@weishuiliang
class TennisProcedure extends Procedure
{
    /**
     * The name of the procedure that will be
     * displayed and taken into account in the search
     *
     * @var string
     */
    public static string $name = 'tennis';

    /**
     * Execute the procedure.
     *
     * @param Request $request
     *
     * @return array|string|integer
     */
    public function ping(Request $request)
    {
        return "pong";
    }
}

and my route in api.php

Route::rpc('/v1/endpoint', [TennisProcedure::class])->name('rpc.endpoint');

and my request:

request url:
http://127.0.0.1:8006/api/v1/endpoint

request  body
{
    "jsonrpc": "2.0",
    "method": "tennis@ping",
    "id": 1
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions