Download the PHP package apsonex/laravel-stock-image without Composer

On this page you can find all versions of the php package apsonex/laravel-stock-image. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-stock-image

Laravel Stock Image

Laravel Stock Image is a pluggable image search API tool that allows you to query stock images from various providers like Unsplash, Pexels, Pixabay, and also generate placeholder images dynamically.


๐Ÿš€ Features


๐Ÿ“ฆ Installation

If you're using Laravel 10+, package auto-discovery will register everything automatically.


โš™๏ธ Configuration

Publish the configuration file if needed:

This will create config/stock-image.php:


๐Ÿ”Œ Routing

The package automatically registers this route when enabled in the config:

Payload Parameters

Key Type Description
keywords string Comma-separated keywords to search images (required)
random_result boolean Whether to return a random image from results
random_provider boolean Whether to pick a random provider
page int Which page to fetch from provider
cache boolean Whether to cache the result (default: false)
result_limit int Limit number of images result
provider_api_keys array Optional - Override API keys per provider (optional)
placeholder_size string Used only when fallback placeholder is returned e.g. 600x400
placeholder_text string Text to show in placeholder image e.g. Sample Text
placeholder_text_color string Color for placeholder text e.g. #000000
placeholder_bg_color string Background color for placeholder e.g. #cccccc

โœ… Example Request (JSON)

POST to /api/ai/tools/stock-images/search


๐Ÿ”„ Sample JSON Response


๐Ÿงช Testing

You can run tests using Pest:

Make sure to mock external APIs to avoid hitting rate limits.


๐Ÿง  License

MIT ยฉ Apsonex


All versions of laravel-stock-image with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^10.0||^11.0||^12.0
spatie/invade Version ^2.1
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package apsonex/laravel-stock-image contains the following files

Loading the files please wait ....