Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

COACHTHEM's avatar

Is it possible to write a script that can be accessed using "web session guard" as well as "API guard"

I am trying to build new web application in laravel and the scripts that I am going to write I want it to be accessed by my web app as well as via API request.

So my question is that, Is it possible to write a script that can accessed using "web session guard" as well as "API guard" if yes how can I achieve that.

I would be using passport for API authentication.

Thanks.

0 likes
0 replies

Please or to participate in this conversation.