for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Ijeffro\Laralocker\LearningLocker\Organisation;
use Ijeffro\Laralocker\LearningLocker\API\APIHandler;
class OrganisationHandler extends APIHandler implements OrganisationInterface {
private $organisation = '/organisation';
private $api = '/api';
private $v2 = '/v2';
protected $headers = [
'Accept' => 'application/json',
'Content-Type' => 'application/json'
];
function __construct($id = null) {
parent::__construct();
$this->id = $id;
id
}
/**
* Learning Locker: Get Organisation Details
*
* @return $response
$response
0
*/
public function get() {
try {
$url = $this->url . $this->api . $this->v2 . $this->organisation;
$response = $this->request($url);
return $response;
} catch (Exception $e) {
Ijeffro\Laralocker\Learn...\Organisation\Exception
Exception
\
return $e;
* Learning Locker: Request Organisation Details
public function update($data) {
$url = $this->url . $this->api . $this->v2 . $this->organisation . '/' . $this->id ?? $this->id;
$response = $this->save($url, $data);