Compare commits

..

No commits in common. "master" and "2.1.1" have entirely different histories.

2 changed files with 5 additions and 21 deletions

View file

@ -12,7 +12,11 @@ Simply add the following line to your `composer.json` and run install/update:
## Configuration
You will need to add the service provider and optionally the facade alias to your `config/app.php`:
Publish the package config files to configure the location of your Wordpress install:
php artisan vendor:publish
You will also need to add the service provider and optionally the facade alias to your `config/app.php`:
```php
'providers' => array(
@ -24,10 +28,6 @@ You will need to add the service provider and optionally the facade alias to you
),
```
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](http://wp-api.org/).
@ -51,11 +51,6 @@ WpApi::post($slug);
```
```php
WpApi::postId($id);
```
#### Categories
```php
WpApi::categories();

View file

@ -60,17 +60,6 @@ class WpApi
return $this->get('posts', ['type' => 'page', 'page' => $page]);
}
/**
* Get post by id
*
* @param int $id
* @return array
*/
public function postId($id)
{
return $this->get("posts/$id");
}
/**
* Get post by slug
*