Looking to hire Laravel developers? Try LaraJobs

laravel-strapi maintained by kodeops

Description
Strapi wrapper for Laravel.
Author
Last update
2025/11/17 11:38 (dev-main)
License
Downloads
348

Comments
comments powered by Disqus
 _     _  _____  ______  _______  _____   _____  _______
 |____/  |     | |     \ |______ |     | |_____] |______
 |    \_ |_____| |_____/ |______ |_____| |       ______|
 

Laravel Strapi Wrapper

This package is a wrapper to make REST API calls to Strapi.

Making a request

The REST API allows accessing the content-types through API endpoints. Strapi automatically creates API endpoints when a content-type is created. API parameters can be used when querying API endpoints to refine the results.

REST API Documentation

use kodeops\LaravelStrapi\Strapi;

$collection = 'tgam-artist';
$params = [
    'populate' => 'deep',
];
$loop_results = true;

Strapi::request($collection, $params, $loop_results);

Update a collection item:

use kodeops\LaravelStrapi\Strapi;

$collection = 'tgam-artist';
$params = [
    'data' => [
        'title' => A title for the collection item',
    ],
];

Strapi::update($collection, $params);

Create a collection item:

use kodeops\LaravelStrapi\Strapi;

$collection = 'tgam-artists';
$params = [
    'data' => [
        'title' => A title for the collection item',
        'description' => A description for the collection item',
        'url' => A url for the collection item',
    ],
];

Strapi::create($collection, $params);