Download the PHP package refinder/laravel-sdk without Composer

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

Refinder Laravel SDK

Official Laravel SDK for Refinder AI Tools
SEO automation and AI-powered content optimization for Laravel applications.

Installation • Quick Start • SEO Tool • API Reference • Error Handling • Testing


Overview

The Refinder Laravel SDK is a first-party Laravel package that integrates your application with the Refinder AI Tools platform. It provides:

What Does the Refinder API Do?

Refinder AI Tools is an AI middleware platform that provides AI-powered tools as a service:


Requirements

Requirement Version
PHP >= 8.2
Laravel 11.x or 12.x
Guzzle >= 7.0

Installation

The package auto-registers its service provider and facade via Laravel's package discovery.

Publish Configuration

This creates config/refinder.php with all available options.

Environment Variables

Add the following to your .env file:

Required: Only REFINDER_API_KEY is required. All other values have sensible defaults.


Quick Start


Configuration

The full configuration file (config/refinder.php):


SEO Tool

The SEO tool is the primary feature of the Refinder platform. It analyzes content and generates comprehensive SEO recommendations.

Input Parameters

Parameter Type Required Default Description
content string Yes Text content to analyze (min 10 chars)
url string No null Page URL for additional context
content_type string No "page" One of: article, product, service, page, blog
language string No "en" Target language code (e.g., en, ar, fr)
depth string No "advanced" Analysis depth: basic, advanced, technical
target_keywords array No [] Specific keywords to optimize around
brand_name string No null Brand name for meta titles/headings
industry string No null Industry context for better optimization

Depth Levels

Level Includes
basic Meta title, meta description, primary keywords
advanced Everything in basic + secondary/long-tail keywords, content analysis, heading suggestions, optimization suggestions, SEO scores
technical Everything in advanced + schema markup, Open Graph tags, canonical URLs, content gap analysis

Using the SeoInput DTO

Shorthand Methods

Working with SEO Output


API Reference

Platform Information

Subscription Details

Usage Statistics

Execution History

Available Tools


Error Handling

The SDK throws specific exception types for different error scenarios:

Exception Properties

Exception Extra Properties
RefinderException errorCode, httpStatus
ValidationException errors (array of field errors)
RateLimitException limit, current
ToolException executionId (UUID for debugging)

Error Handling Example

Error Codes Reference

HTTP Code Description
401 MISSING_API_KEY No API key in request header
401 INVALID_API_KEY API key doesn't match any active key
401 API_KEY_EXPIRED API key has expired
403 PLATFORM_INACTIVE Platform is disabled
403 NO_ACTIVE_SUBSCRIPTION No active subscription
403 SUBSCRIPTION_EXPIRED Subscription has expired
403 TOOL_NOT_ALLOWED Plan doesn't include this tool
404 TOOL_NOT_FOUND Tool slug doesn't exist
404 EXECUTION_NOT_FOUND Execution UUID not found
422 VALIDATION_ERROR Input validation failed
429 DAILY_LIMIT_EXCEEDED Daily quota exceeded
429 MONTHLY_LIMIT_EXCEEDED Monthly quota exceeded
500 TOOL_ERROR Tool execution error
502 LLM_ERROR AI provider returned an error

Events

When config('refinder.events') is true (default), the package dispatches Laravel events:

ToolExecuted

Dispatched after a successful tool execution:

ToolExecutionFailed

Dispatched after a failed tool execution:

RateLimitApproaching

Dispatched when usage approaches the limit:


Caching

Enable response caching for identical tool inputs:


Rate Limiting & Quotas

The Refinder API enforces quotas based on your subscription plan:

Limit Reset Period
Daily Midnight UTC
Monthly 1st of month

Checking Quota Usage


Testing

The SDK provides a RefinderFake class for testing:

Basic Fake

Custom Fake Responses

Assertions


Real-World Examples

E-Commerce Product SEO

Batch Processing with Queue

Admin Dashboard Integration


Package Structure


Authentication

Every request to the Refinder API includes the platform's API key automatically:

Property Value
Prefix rfnd_
Total length 53 characters
Format rfnd_ + 48 alphanumeric characters

The API key is read from config('refinder.api_key') and attached to every HTTP request by the RefinderClient.


Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

Security

If you discover a security vulnerability, please send an email to [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see LICENSE for more information.


Built with care by the Refinder AI Tools team.


All versions of laravel-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0|^12.0
illuminate/http Version ^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 refinder/laravel-sdk contains the following files

Loading the files please wait ...