Download the PHP package timjohnbancroft/constructor-laravel without Composer

On this page you can find all versions of the php package timjohnbancroft/constructor-laravel. 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 constructor-laravel

Constructor.io Laravel Integration

Latest Version on Packagist License

A Laravel package for Constructor.io - AI-powered product discovery.

Features

Architecture Overview

Requirements

Installation

1. Install via Composer

2. Publish Configuration

3. Configure Environment

Add to your .env file:

Get your credentials from the Constructor.io Dashboard.

Credential Types:

Quick Start

Search Products

Browse by Category

Autocomplete

Recommendations

Collections

AI Shopping Agent

Product Insights Agent

Catalog Management

Recipes (If Configured)

Data Transfer Objects (DTOs)

All search operations return strongly-typed DTOs with convenient methods.

SearchResults

Returned by search(), browse(), and browseCollection().

Facets Structure:

AutocompleteResults

Returned by autocomplete() and getZeroStateData().

RecommendationResults

Returned by getRecommendations() and getItemRecommendations().

Complete Facade Methods Reference

Search Options Reference

Options available for search() and browse():

Laravel Scout Integration

Register the Engine

The package automatically registers the constructor Scout driver. Configure in config/scout.php:

Make Models Searchable

Search with Scout

Configuration Reference

config/constructor.php

Available Services

Service Description
ConstructorSandboxSearch Search, browse, autocomplete, recommendations, collections
ConstructorAgentService AI Shopping Agent and Product Insights Agent
ConstructorService Catalog uploads, task monitoring, admin operations
ConstructorEngine Laravel Scout engine implementation

Error Handling

The package handles errors gracefully:

Troubleshooting

"Constructor.io configuration not properly set"

Ensure all required environment variables are set:

Empty results when products should exist

  1. Check API key: Verify the API key matches your Constructor index
  2. Check section name: Default is 'Products', ensure your index uses this
  3. Check filters: Some filters may be too restrictive
  4. View logs: Check storage/logs/laravel.log for API errors

Facets not returning

Recommendations returning empty

  1. Verify the pod ID exists in your Constructor account
  2. Some pods require item_id - use getItemRecommendations() instead
  3. Check that the pod has been trained with data

Agent authentication failures

Rate limit errors

Testing Your Integration

Artisan Test Command

Unit Testing

Mock the facade for testing:

Best Practices

Caching Recommendations

User Personalization

Pass user identifiers for personalized results:

Handling Zero-State Gracefully

Documentation

License

MIT License. See LICENSE for details.


All versions of constructor-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.0
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 timjohnbancroft/constructor-laravel contains the following files

Loading the files please wait ...