Skip to content

Commit

Permalink
Update for latest statamic version
Browse files Browse the repository at this point in the history
  • Loading branch information
alecritson committed Oct 2, 2020
1 parent 9874d07 commit de5b3bd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"name": "ritson/placid-statamic",
"description": "Consume RESTful APIs in your Statamic templates",
"type": "statamic-addon",
"require": {
"guzzlehttp/guzzle": "~6.0",
"statamic/cms": "3.0.*@beta"
"statamic/cms": "3.0.*"
},
"license": "MIT",
"authors": [
Expand All @@ -20,6 +18,10 @@
}
},
"extra": {
"statamic": {
"name": "Placid",
"description": "Send RESTful requests in your templates."
},
"laravel": {
"providers": [
"Ritson\\Placid\\PlacidServiceProvider"
Expand Down
23 changes: 10 additions & 13 deletions src/PlacidTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Ritson\Placid;

use Exception;
use Ritson\Placid\PlacidRepository;
use Ritson\Placid\PlacidResource;
use Statamic\Tags\Tags;
Expand All @@ -20,8 +19,6 @@ public function index()
{
return $this->request();
}

// protected function get

/**
* The {{ placid:example }} tag.
Expand All @@ -30,18 +27,18 @@ public function index()
*/
public function request()
{
$handle = $this->getParam('handle', null);
$handle = $this->params->get('handle');

$options = [
'host' => $this->getParam('host', null),
'headers' => $this->getParam('headers', null),
'path' => $this->getParam('path', null),
'cache' => $this->getParam('cache', null),
'method' => $this->getParam('method', null),
'segments' => $this->getParam('segments', null),
'url' => $this->getParam('url', null),
'query' => $this->getParam('query', null),
'auth' => $this->getParam('auth', null)
'host' => $this->params->get('host', null),
'headers' => $this->params->get('headers', null),
'path' => $this->params->get('path', null),
'cache' => $this->params->get('cache', null),
'method' => $this->params->get('method', null),
'segments' => $this->params->get('segments', null),
'url' => $this->params->get('url', null),
'query' => $this->params->get('query', null),
'auth' => $this->params->get('auth', null)
];

if ($handle) {
Expand Down

0 comments on commit de5b3bd

Please sign in to comment.