31 lines
744 B
PHP
31 lines
744 B
PHP
<?php
|
|
|
|
namespace App\Services\Api;
|
|
|
|
class SystemParameterService extends BaseApiService
|
|
{
|
|
public function getAllParameters(array $params = [])
|
|
{
|
|
return $this->get('/system-parameters', $params);
|
|
}
|
|
|
|
public function getParameter($id)
|
|
{
|
|
return $this->get("/system-parameters/{$id}");
|
|
}
|
|
|
|
public function createParameter(array $data)
|
|
{
|
|
return $this->post('/system-parameters', $data);
|
|
}
|
|
|
|
public function updateParameter($id, array $data)
|
|
{
|
|
return $this->post("/system-parameters/{$id}", array_merge($data, ['_method' => 'PUT']));
|
|
}
|
|
|
|
public function deleteParameter($id)
|
|
{
|
|
return $this->post("/system-parameters/{$id}", ['_method' => 'DELETE']);
|
|
}
|
|
}
|