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