php - Is there any way to protect some api that has no login requirement using laravel sanctum?

This is my first time using laravel sanctum. Before this, I use Laravel Passport for protecting the route. So the problem is, there are 2 kind of route. Route that need user authentication, like API profile, my order, and inbox. And route that doesn't need user authentication to access, like API version control, splashscreen, and forgot password. In my last project when using passport, in passport there was client token, that doesn't need user credential to get. Then I use auth_client middleware to protect route that doesn't need user authentication. First I want to ask, is this the correct way?
If that was correct way, and protecting no need login route is recommended, how i do the same thing using laravel sanctum?
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: illuminate\http\exceptions\posttoolargeexception
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.