Question: How To Add New Controller In Api

How To Add New Controller In Api

Hi, I have created a new sample controller like this: https://prnt.sc/xyx3m3 But, when I hit the API getting this error: https://prnt.sc/xyx4eu Please help me out. Thanks, Sudhir

SV

Sudhir Vadodariya

Asked
Hi,

I have created a new sample controller like this: https://prnt.sc/xyx3m3

But, when I hit the API getting this error: https://prnt.sc/xyx4eu

Please help me out.

Thanks, Sudhir
  • SV

    Sudhir Vadodariya

    Answered
    I tried by renaming function index_post as well
  • MS

    Mian Saleem

    Answered
    Hello,

    Pay attention on file name. It should be `Sample.php`

    Thank you
  • SV

    Sudhir Vadodariya

    Answered
    Yes, that is resolved. Yes, all those problems are solved. But, actual problem was to disable csrf_protection or set it to FALSE to enable POST methods.

    Anyway, thanks for your reply!

    But, I have another query that, is there any API or link available to show the quote or sales PDF? I mean that link just gives the preview of it not directly download the PDF.

    Thanks ahead the time!

    Sudhir
  • MS

    Mian Saleem

    Answered
    Hello,

    No. I am not aware of any. Even pdf preview is download-able.

    Thank you
  • Login to Reply