Compare commits

..

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

3 changed files with 7 additions and 23 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

@ -1,10 +1,10 @@
<?php namespace Threesquared\LaravelWpApi\Facades;
use Illuminate\Support\Facades\Facade;
use Threesquared\LaravelWpApi\WpApi as WordpressApi;
use Threesquared\LaravelWpApi\WpApi;
class WpApi extends Facade {
protected static function getFacadeAccessor() { return WordpressApi::class; }
protected static function getFacadeAccessor() { return WpApi::class; }
}

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
*