kodeops/laravel-strapi
Composer 安装命令:
composer require kodeops/laravel-strapi
包简介
Strapi wrapper for Laravel.
README 文档
README
_ _ _____ ______ _______ _____ _____ _______
|____/ | | | \ |______ | | |_____] |______
| \_ |_____| |_____/ |______ |_____| | ______|
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.
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);
统计信息
- 总下载量: 270
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-01-03