Addon tags with Request parameter

Hi, I have an add-on controller that receives "Request $request" parameter.

How do I put it in the tags, so the tags can pass the "Request $request" parameter to the controller??

This is the method in the controller:-

public function postAccessToken(Request $request) {
$params = array(
"reqData" => array(
'productId'=> $request->productId,
'userId'=> $request->userId,
)
);
blablabla...

How should i call the controller in the tag and in the views?

public function productinfo(Request $request) {
dd($request->all());
return app('Statamic\Addons\Product\ProductController')->postAccessToken($request);
}

>>>>>>> Unanswered <<<<<<<
2 Replies
2 Followers