1 year agoby Sunil
can I write like this
public function __constructor()
for adding middleware to all api
wating for your reply.
Sarthak Shrivastava replied 1 year ago
Yes yes sure you can do that
Sunil replied 1 year ago
I mean can i write
on ProductController so that all products api need authenticate.
You can use middlewar on you api.php file for all your routes
Try like this
// Here comes all your api routes