定制 threesquared/laravel-wp-api 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

threesquared/laravel-wp-api

最新稳定版本:2.1.1

Composer 安装命令:

composer require threesquared/laravel-wp-api

包简介

Laravel package for the Wordpress JSON REST API

README 文档

README

Build Status Latest Stable Version

Laravel 5 package for the Wordpress JSON REST API

Install

Simply add the following line to your composer.json and run install/update:

"threesquared/laravel-wp-api": "~2.0"

Configuration

You will need to add the service provider and optionally the facade alias to your config/app.php:

'providers' => array(
  Threesquared\LaravelWpApi\LaravelWpApiServiceProvider::class
)

'aliases' => array(
  'WpApi' => Threesquared\LaravelWpApi\Facades\WpApi::class
),

And publish the package config files to configure the location of your Wordpress install:

php artisan vendor:publish

Usage

The package provides a simplified interface to some of the existing api methods documented here. You can either use the Facade provided or inject the Threesquared\LaravelWpApi\WpApi class.

Posts

WpApi::posts($page);

Pages

WpApi::pages($page);

Post

WpApi::post($slug);
WpApi::postId($id);

Categories

WpApi::categories();

Tags

WpApi::tags();

Category posts

WpApi::categoryPosts($slug, $page);

Author posts

WpApi::authorPosts($slug, $page);

Tag posts

WpApi::tagPosts($slug, $page);

Search

WpApi::search($query, $page);

Archive

WpApi::archive($year, $month, $page);

统计信息

  • 总下载量: 10.28k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 15
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 13
  • Watchers: 7
  • Forks: 49
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-01-22