microCMS PHP SDK

Related tags

CMS microcms-php-sdk
Overview

microcms-php-sdk

Installation

$ composer require microcmsio/microcms-php-sdk

Usage

list("blog")->contents[0]->title; $list = $client->list("blog", [ "draftKey" => "foo", "limit" => 10, "offset" => 1, "orders" => ["createdAt", "-updatedAt"], "q" => "PHP", "fields" => ["id", "title"], "filters" => "title[contains]microCMS", "depth" => 1 ]); echo $list->contents[0]->title; echo $client->get("blog", "my-content-id")->title; echo $client->get("blog", "my-content-id", [ "draftKey" => "foo", "fields" => ["id", "title"], "depth" => 1, ])->title; $createResult = $client->create("blog", [ "title" => "Hello, microCMS!", "contents" => "Awesome contents..." ]); echo $createResult->id; $createResult = $client->create("blog", [ "id" => "new-my-content-id", "title" => "Hello, microCMS!", "contents" => "Awesome contents..." ]); echo $createResult->id; $updateResult = $client->update("blog", [ "id" => "new-my-content-id", "title" => "Hello, microCMS PHP SDK!" ]); echo $updateResult->id; $client->delete("blog", "new-my-content-id"); ">


require_once('vendor/autoload.php');

$client = new \Microcms\Client(
  "YOUR_DOMAIN",  // YOUR_DOMAIN is the XXXX part of XXXX.microcms.io
  "YOUR_API_KEY"  // API Key
);

echo $client->list("blog")->contents[0]->title;

$list = $client->list("blog", [
  "draftKey" => "foo",
  "limit" => 10,
  "offset" => 1,
  "orders" => ["createdAt", "-updatedAt"],
  "q" => "PHP",
  "fields" => ["id", "title"],
  "filters" => "title[contains]microCMS",
  "depth" => 1
]);
echo $list->contents[0]->title;

echo $client->get("blog", "my-content-id")->title;

echo $client->get("blog", "my-content-id", [
  "draftKey" => "foo",
  "fields" => ["id", "title"],
  "depth" => 1,
])->title;

$createResult = $client->create("blog", [
  "title" => "Hello, microCMS!",
  "contents" => "Awesome contents..."
]);
echo $createResult->id;

$createResult = $client->create("blog", [
  "id" => "new-my-content-id",
  "title" => "Hello, microCMS!",
  "contents" => "Awesome contents..."
]);
echo $createResult->id;

$updateResult = $client->update("blog", [
  "id" => "new-my-content-id",
  "title" => "Hello, microCMS PHP SDK!"
]);
echo $updateResult->id;

$client->delete("blog", "new-my-content-id");
You might also like...
A PHP CMS powered by Laravel 5 and Sentry
A PHP CMS powered by Laravel 5 and Sentry

Bootstrap CMS Bootstrap CMS was created by, and is maintained by Graham Campbell, and is a PHP CMS powered by Laravel 5.1 and Sentry. It utilises many

Simple PHP shop CMS based on Laravel 5.1
Simple PHP shop CMS based on Laravel 5.1

LaraShop LaraShop is a simple SHOP CMS based on Laravel framework. Temporarily available at russian language, in planned english. Screenshots Features

Gitamin is an open source git repository management software built with the Laravel PHP Framework.

Gitamin(pronounced /ˈgɪtəmɪn/, inspired by Vitamin) is an open source git repository management software built with the Laravel PHP Framework.

A PHP Blogging Platform. Simple and Powerful.

Typecho Blogging Platform Typecho is a PHP Blogging Platform. Simple and Powerful.

REDAXO, a PHP-based CMS since 2004. Both simple and flexible.
REDAXO, a PHP-based CMS since 2004. Both simple and flexible.

🌎 Deutsch Content Management since 2004. Both simple and flexible. REDAXO provides you an easy-to-learn website framework. It lets you create content

A multilingual, extensible, community oriented CMS developed in PHP
A multilingual, extensible, community oriented CMS developed in PHP

ImpressCMS is a community developed Content Management System. With this tool maintaining the content of a website becomes as easy as writing a word d

A restaurant website using PHP and MySQL. (A group project at Chandigarh University)

tasty-indeed-restaurant-website-php Description A restaurant website using PHP and MySQL for group project at Chandigarh University. Steps to setup Do

Soosyze CMS is a minimalist content management system in PHP, without database to create and manage your website easily
Soosyze CMS is a minimalist content management system in PHP, without database to create and manage your website easily

Soosyze CMS is a content management system without a database. It's easy to create and manage you

YesWiki is a wiki system written in PHP, including extensions making collaboration more simple (databases, maps, easy editing, bootstrap themes,...).

YesWiki YesWiki is a Free Software under the AGPL licence, made for creating and managing your website, in a collaborative way. YesWiki allows any web

Owner
microCMS
microCMS
PHPDish is a powerful forum system written in PHP. It is based on the Symfony PHP Framework.

PHPDish 是一个基于Symfony框架开发的内容社区系统;得益于大量的前端以及后端的第三方类库的使用使得PHPDish有着高质量的代码,敏捷实现; 你可以使用composer或者直接下载本仓库进行程序的安装,注意切换到tag。

PHPDISH 227 Dec 8, 2022
Self-hosted CMS platform based on the Laravel PHP Framework.

October is a Content Management System (CMS) and web platform whose sole purpose is to make your development workflow simple again. It was born out of

October CMS 10.8k Jan 4, 2023
Pyro is an experienced and powerful Laravel PHP CMS.

PyroCMS PyroCMS is an easy to use, powerful, and modular CMS and development platform built with Laravel 5. Security If you discover any security rela

PyroCMS 3.1k Dec 23, 2022
Multilingual PHP CMS built with Laravel and bootstrap

Lavalite This is an open source of Content Management System developed with Laravel framework. Documentation Visit Documentation section in the websit

LavaLite 2.6k Jan 4, 2023
Question2Answer is a free and open source platform for Q&A sites, running on PHP/MySQL.

Question2Answer (Q2A) is a popular free open source Q&A platform for PHP/MySQL, used by over 22,000 sites in 40 languages.

Question2Answer 1.6k Jan 5, 2023
Elefant, the refreshingly simple PHP CMS and web framework.

Elefant is a refreshingly simple PHP content management system and web framework. Elefant is a fast, lean tool for building everything from simple websites to complete web applications.

Aband*nthecar 200 Dec 22, 2022
PressDoWiki - Fast & Light PHP Wiki Engine

PressDoWiki - Fast & Light PHP Wiki Engine 이 위키는 현재 제작 중입니다. Currently in development. the seed와 최대한 유사하게 구현하는 것을 목표로 하고 있는 PHP 위키 엔진입니다. 요구 사항 (Requi

PressDo 18 Nov 25, 2022
This is a Hostel Management system project is created using PHP and MYSQL

Hostel-Managment-System-PHP This is a Hostel Management system project is created using PHP and MYSQL. Developed as a package for the subject Relation

Hari Ram 5 May 10, 2022
A simple video station based on PHP and MySQL.

Simple-PHP-Video-Station 一个简单的、基于 PHP 和 MySQL 的视频点播站。 A simple video station based on PHP and MySQL. 特点 仅 655K 主体文件和 3 张数据表 前后端分离 支持 pjax 无刷适配 使用 DPla

HIMlaoS_Misa 9 Dec 27, 2022
Free, open-source, self-hosted CMS platform based on the Laravel PHP Framework.

Winter is a Content Management System (CMS) and web platform whose sole purpose is to make your development workflow simple again. It was born out of

Winter CMS 1.1k Jan 3, 2023