You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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";
}
}
Hi @weishuiliang I checked and my new installation works well with the example you gave. Is it possible that you put the route declaration in the sanctum group and pass it without its key?
My routes file looks like this:
<?phpuseIlluminate\Support\Facades\Route;
useApp\Http\Procedures\TennisProcedure;
/*|--------------------------------------------------------------------------| API Routes|--------------------------------------------------------------------------|| Here is where you can register API routes for your application. These| routes are loaded by the RouteServiceProvider within a group which| is assigned the "api" middleware group. Enjoy building your API!|*/Route::rpc('/v1/endpoint', [TennisProcedure::class])->name('rpc.endpoint');
and my route in api.php
and my request:
The text was updated successfully, but these errors were encountered: