Attract facade: nothing to import beyond it, nothing to
catch, and a test of it is three lines. The SDK handles the rest.
fetchski/attract-cms-laravel
Laravel 12 or 13 · PHP 8.5.12+ · Guzzle 7.10+ or 8.3+
What it does for you
Typed answers
Readonly objects with properties: Collections, Carbon dates, PHP enums. No null checks on what the
site always sends.
Nothing to catch
Laravel’s handler logs and renders every failure; a refused value is a normal validation error.
Safe retries
Rate limits waited out; reads retried when the site doesn’t answer.
Whole lists
…All() walks every page as a LazyCollection, however the list pages.Three-line tests
Attract::fake(), a factory for every model, and assertCalled.Artisan tools
Scaffold an Action, list every method, call one from the CLI, check a site.
The guides
Installation
Install it from your own site, then into your app. Install the SDK →
Configuration
One site from
.env, more by hand, or a table. Configure →Calling the API
Arguments, answers, lists, jobs and uploads. Make calls →
Artisan commands
Install the SDK into your app: publish the config, write the site’s URL, key and signing secret to.env, and check the site (Installation):
Terminal
attract_api_keys table instead of .env
(Key in the database):
Terminal
Terminal
Terminal
Terminal
--module=<Name> or
--app):
Terminal
Terminal
Terminal
Terminal
Terminal
Every command, with its options
What each command does, when to use it, and examples to copy.
The reference
Every method has its own page in this tab’s sidebar, grouped like the API reference.The call, ready to copy
One or two lines, pinned beside the page.
Its arguments
Named arguments with their types, a body’s fields among them.
What it returns
Each property of the answer, typed, with nested models one click away.
Its test and its Action
A three-line fake, and the Artisan line that scaffolds the Action.
Start with Pages → List
The first method in the reference.
Your own site serves the package: any of its API keys installs it, no other account needed.
Using TypeScript? See the TypeScript SDK.