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

Green21's avatar

Laravel Zero custom integration?

I want to use Laravel Zero + Single file PHP librar (big class with various methods) . This library use custom API calls via curl (on backstage).

I was wonder where put this thing because:

  1. I made http requests using this library but my app is console-based (i don't have any controllers files)
  2. It's not database, but my goal is to use singleton if it's possible.
  3. Laravel apps are designed more for web-apps and file structure proved it.

What's your way to deal with custom integration in Laravel that looks like mine?

0 likes
1 reply
Tray2's avatar

Not sure what you are after here, but it sounds like you are not building a web application, but rather a application that uses the command line to interact with the user.

Laravel is a framework for building web applications/apis, and not really built for making command line tools like that.

I would probably roll my own with the help from some components

  • laravel/prompts
  • symfony/console
  • guzzlehttp/guzzle

Please or to participate in this conversation.