1

I recently started on a project using Laravel and I'm curious to know that if I can consume Django web services on Laravel.

I tried searching google but all that came up were comparisons on it. I want to know if there are any struggles or issues when integrating a python api for php.

(ps. I'm clueless to a lot of these stuffs so am sorry if somethings aren't clear to me)

1
  • 1
    Web services should (at least in theory) be platform agnostic. Why should it matter? Commented Dec 4, 2018 at 2:28

1 Answer 1

1

If you want to with your Django program from within Laravel there are 2 possible ways of doing this:

  1. Guzzle, PHP HTTP client - This will allow you to get and posts from within PHP: http://docs.guzzlephp.org/en/stable/

  2. The Symfony Process Component - which allows you to execute python code in from within PHP and get the anything that is returned: https://symfony.com/doc/current/components/process.html

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks so much for your help! Will check them out
Your more than welcome! I happened to be looking into the same problem the other day.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.