Package Data | |
---|---|
Maintainer Username: | astritzeqiri |
Maintainer Contact: | ben@3sq.re (Ben Speakman) |
Package Create Date: | 2017-02-09 |
Package Last Update: | 2017-03-02 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-22 03:10:45 |
Package Statistics | |
---|---|
Total Downloads: | 896 |
Monthly Downloads: | 1 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 1 |
Total Open Issues: | 0 |
This is a fork of threesquared/laravel-wp-api
Laravel 5 package for the Wordpress JSON REST API
Simply add the following line to your composer.json
and run install/update:
"astritzeqiri/laravel-wp-api": "~2.1"
You will need to add the service provider and optionally the facade alias to your config/app.php
:
'providers' => array(
AstritZeqiri\LaravelWpApi\LaravelWpApiServiceProvider::class
)
'aliases' => array(
'WpApi' => AstritZeqiri\LaravelWpApi\Facades\WpApi::class
),
And publish the package config files to configure the location of your Wordpress install:
php artisan vendor:publish
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 AstritZeqiri\LaravelWpApi\WpApi
class.
WpApi::posts($page);
WpApi::pages($page);
WpApi::post($slug);
WpApi::postId($id);
WpApi::categories();
WpApi::tags();
WpApi::categoryPosts($slug, $page);
WpApi::authorPosts($slug, $page);
WpApi::tagPosts($slug, $page);
WpApi::search($query, $page);
WpApi::archive($year, $month, $page);