API
This commit is contained in:
@ -11,4 +11,17 @@ class Base {
|
||||
public function __invoke(Request $request, Response $response): Response {
|
||||
return $this->withJson($response, []);
|
||||
}
|
||||
public function generate_key(Request $request, Response $response): Response {
|
||||
$server_addr = explode('.', $request->getServerParams()['SERVER_ADDR']);
|
||||
$remote_addr = explode('.', $request->getServerParams()['REMOTE_ADDR']);
|
||||
for ($i = 0; $i < 3; $i ++) {
|
||||
if ($server_addr[$i] != $remote_addr[$i]) {
|
||||
throw new \InvalidArgumentException('Invalid connection address.');
|
||||
}
|
||||
}
|
||||
$salt = mt_rand();
|
||||
$signature = hash_hmac('sha256', $salt, 'contabilidad', true);
|
||||
$key = urlencode(base64_encode($signature));
|
||||
return $this->withJson($response, ['key' => $key]);
|
||||
}
|
||||
}
|
||||
|
@ -5,13 +5,34 @@ use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use ProVM\Common\Define\Controller\Json;
|
||||
use ProVM\Common\Factory\Model as Factory;
|
||||
use Contabilidad\Common\Service\TiposCambios as Service;
|
||||
use Contabilidad\Categoria;
|
||||
|
||||
class Categorias {
|
||||
use Json;
|
||||
|
||||
public function __invoke(Request $request, Response $response, Factory $factory): Response {
|
||||
$categorias = $factory->find(Categoria::class)->array();
|
||||
public function __invoke(Request $request, Response $response, Factory $factory, Service $service): Response {
|
||||
$categorias = $factory->find(Categoria::class)->many();
|
||||
array_walk($categorias, function(&$item) use ($service) {
|
||||
$arr = $item->toArray();
|
||||
$arr['cuentas'] = array_map(function($item) {
|
||||
return $item->toArray();
|
||||
}, $item->cuentas());
|
||||
$maps = ['activo', 'pasivo', 'ganancia', 'perdida'];
|
||||
foreach ($maps as $m) {
|
||||
$p = $m . 's';
|
||||
$t = ucfirst($m);
|
||||
$cuentas = $item->getCuentasOf($t);
|
||||
if ($cuentas === false or $cuentas === null) {
|
||||
$arr[$p] = 0;
|
||||
continue;
|
||||
}
|
||||
$arr[$p] = array_reduce($cuentas, function($sum, $item) use($service) {
|
||||
return $sum + $item->saldo($service, true);
|
||||
});
|
||||
}
|
||||
$item = $arr;
|
||||
});
|
||||
if ($categorias) {
|
||||
usort($categorias, function($a, $b) {
|
||||
return strcmp($a['nombre'], $b['nombre']);
|
||||
@ -68,14 +89,14 @@ class Categorias {
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function cuentas(Request $request, Response $response, Factory $factory, $categoria_id): Response {
|
||||
public function cuentas(Request $request, Response $response, Factory $factory, Service $service, $categoria_id): Response {
|
||||
$categoria = $factory->find(Categoria::class)->one($categoria_id);
|
||||
$cuentas = null;
|
||||
if ($categoria !== null) {
|
||||
$cuentas = $categoria->cuentas();
|
||||
if ($cuentas !== null) {
|
||||
array_walk($cuentas, function(&$item) {
|
||||
$item = $item->toArray();
|
||||
array_walk($cuentas, function(&$item) use ($service) {
|
||||
$item = $item->toArray($service);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use ProVM\Common\Define\Controller\Json;
|
||||
use ProVM\Common\Factory\Model as Factory;
|
||||
use Contabilidad\Common\Service\TiposCambios as Service;
|
||||
use Contabilidad\Cuenta;
|
||||
|
||||
class Cuentas {
|
||||
@ -14,11 +15,15 @@ class Cuentas {
|
||||
$cuentas = $factory->find(Cuenta::class)->array();
|
||||
if ($cuentas) {
|
||||
usort($cuentas, function($a, $b) {
|
||||
$t = strcmp($a['tipo']['descripcion'], $b['tipo']['descripcion']);
|
||||
if ($t != 0) {
|
||||
return $t;
|
||||
}
|
||||
$c = strcmp($a['categoria']['nombre'], $b['categoria']['nombre']);
|
||||
if ($c == 0) {
|
||||
return strcmp($a['nombre'], $b['nombre']);
|
||||
if ($c != 0) {
|
||||
return $c;
|
||||
}
|
||||
return $c;
|
||||
return strcmp($a['nombre'], $b['nombre']);
|
||||
});
|
||||
}
|
||||
$output = [
|
||||
@ -90,15 +95,28 @@ class Cuentas {
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function transacciones(Request $request, Response $response, Factory $factory, $cuenta_id, $limit = null, $start = 0): Response {
|
||||
public function transacciones(Request $request, Response $response, Factory $factory, Service $service, $cuenta_id, $limit = null, $start = 0): Response {
|
||||
$cuenta = $factory->find(Cuenta::class)->one($cuenta_id);
|
||||
$transacciones = null;
|
||||
if ($cuenta !== null) {
|
||||
$transacciones = $cuenta->transacciones($limit, $start);
|
||||
if (count($transacciones)) {
|
||||
array_walk($transacciones, function(&$item) {
|
||||
$item = $item->toArray();
|
||||
});
|
||||
if (count($transacciones) > 0) {
|
||||
foreach ($transacciones as &$transaccion) {
|
||||
$arr = $transaccion->toArray();
|
||||
if ($cuenta->moneda()->codigo === 'CLP') {
|
||||
if ($transaccion->debito()->moneda()->codigo !== 'CLP' or $transaccion->credito()->moneda()->codigo !== 'CLP') {
|
||||
if ($transaccion->debito()->moneda()->codigo !== 'CLP') {
|
||||
$c = $transaccion->debito();
|
||||
} else {
|
||||
$c = $transaccion->credito();
|
||||
}
|
||||
$service->get($transaccion->fecha(), $c->moneda()->id);
|
||||
$arr['valor'] = $c->moneda()->cambiar($transaccion->fecha(), $transaccion->valor);
|
||||
$arr['valorFormateado'] = $cuenta->moneda()->format($arr['valor']);
|
||||
}
|
||||
}
|
||||
$transaccion = $arr;
|
||||
}
|
||||
}
|
||||
}
|
||||
$output = [
|
||||
|
@ -5,7 +5,7 @@ use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use ProVM\Common\Define\Controller\Json;
|
||||
use ProVM\Common\Factory\Model as Factory;
|
||||
use Contabilidad\Common\Service\PdfHandler;
|
||||
use Contabilidad\Common\Service\DocumentHandler as Handler;
|
||||
|
||||
class Import {
|
||||
use Json;
|
||||
@ -14,8 +14,8 @@ class Import {
|
||||
$post = $request->getParsedBody();
|
||||
return $this->withJson($response, $post);
|
||||
}
|
||||
public function uploads(Request $request, Response $response, PdfHandler $handler): Response {
|
||||
$output = $handler->load();
|
||||
public function uploads(Request $request, Response $response, Handler $handler): Response {
|
||||
$output = $handler->handle();
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
}
|
||||
|
71
api/common/Controller/Monedas.php
Normal file
71
api/common/Controller/Monedas.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
namespace Contabilidad\Common\Controller;
|
||||
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use ProVM\Common\Define\Controller\Json;
|
||||
use ProVM\Common\Factory\Model as Factory;
|
||||
use Contabilidad\Moneda;
|
||||
|
||||
class Monedas {
|
||||
use Json;
|
||||
|
||||
public function __invoke(Request $request, Response $response, Factory $factory): Response {
|
||||
$monedas = $factory->find(Moneda::class)->array();
|
||||
if ($monedas) {
|
||||
usort($monedas, function($a, $b) {
|
||||
return strcmp($a['denominacion'], $b['denominacion']);
|
||||
});
|
||||
}
|
||||
$output = [
|
||||
'monedas' => $monedas
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function show(Request $request, Response $response, Factory $factory, $moneda_id): Response {
|
||||
$moneda = $factory->find(Moneda::class)->one($moneda_id);
|
||||
$output = [
|
||||
'input' => $moneda_id,
|
||||
'moneda' => $moneda?->toArray()
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function add(Request $request, Response $response, Factory $factory): Response {
|
||||
$input = json_decode($request->getBody());
|
||||
$results = [];
|
||||
if (is_array($input)) {
|
||||
foreach ($input as $in) {
|
||||
$moneda = Moneda::add($factory, $in);
|
||||
$results []= ['moneda' => $moneda?->toArray(), 'agregado' => $moneda?->save()];
|
||||
}
|
||||
} else {
|
||||
$moneda = Moneda::add($factory, $input);
|
||||
$results []= ['moneda' => $moneda?->toArray(), 'agregado' => $moneda?->save()];
|
||||
}
|
||||
$output = [
|
||||
'input' => $input,
|
||||
'monedas' => $results
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function edit(Request $request, Response $response, Factory $factory, $moneda_id): Response {
|
||||
$moneda = $factory->find(Moneda::class)->one($moneda_id);
|
||||
$output = [
|
||||
'input' => $moneda_id,
|
||||
'old' => $moneda->toArray()
|
||||
];
|
||||
$input = json_decode($request->getBody());
|
||||
$moneda->edit($input);
|
||||
$output['moneda'] = $moneda->toArray();
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function delete(Request $request, Response $response, Factory $factory, $moneda_id): Response {
|
||||
$moneda = $factory->find(Moneda::class)->one($moneda_id);
|
||||
$output = [
|
||||
'input' => $moneda_id,
|
||||
'moneda' => $moneda->toArray(),
|
||||
'eliminado' => $moneda->delete()
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
}
|
95
api/common/Controller/TiposCambios.php
Normal file
95
api/common/Controller/TiposCambios.php
Normal file
@ -0,0 +1,95 @@
|
||||
<?php
|
||||
namespace Contabilidad\Common\Controller;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use ProVM\Common\Define\Controller\Json;
|
||||
use ProVM\Common\Factory\Model as Factory;
|
||||
use Contabilidad\Common\Service\TiposCambios as Service;
|
||||
use Contabilidad\TipoCambio;
|
||||
|
||||
class TiposCambios {
|
||||
use Json;
|
||||
|
||||
public function __invoke(Request $request, Response $response, Factory $factory): Response {
|
||||
$tipos = $factory->find(TipoCambio::class)->array();
|
||||
if ($tipos) {
|
||||
usort($tipos, function($a, $b) {
|
||||
return strcmp($a['fecha'], $b['fecha']);
|
||||
});
|
||||
}
|
||||
$output = [
|
||||
'tipos' => $tipos
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function show(Request $request, Response $response, Factory $factory, $tipo_id): Response {
|
||||
$tipo = $factory->find(TipoCambio::class)->one($tipo_id);
|
||||
$output = [
|
||||
'input' => $tipo_id,
|
||||
'tipo' => $tipo?->toArray()
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function add(Request $request, Response $response, Factory $factory): Response {
|
||||
$input = json_decode($request->getBody());
|
||||
$results = [];
|
||||
if (is_array($input)) {
|
||||
foreach ($input as $in) {
|
||||
$tipo = TipoCambio::add($factory, $in);
|
||||
$results []= ['tipo' => $tipo?->toArray(), 'agregado' => $tipo?->save()];
|
||||
}
|
||||
} else {
|
||||
$tipo = TipoCambio::add($factory, $input);
|
||||
$results []= ['tipo' => $tipo?->toArray(), 'agregado' => $tipo?->save()];
|
||||
}
|
||||
$output = [
|
||||
'input' => $input,
|
||||
'tipos' => $results
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function edit(Request $request, Response $response, Factory $factory, $tipo_id): Response {
|
||||
$tipo = $factory->find(TipoCambio::class)->one($tipo_id);
|
||||
$output = [
|
||||
'input' => $tipo_id,
|
||||
'old' => $tipo->toArray()
|
||||
];
|
||||
$input = json_decode($request->getBody());
|
||||
$tipo->edit($input);
|
||||
$output['tipo'] = $tipo->toArray();
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function delete(Request $request, Response $response, Factory $factory, $tipo_id): Response {
|
||||
$tipo = $factory->find(TipoCambio::class)->one($tipo_id);
|
||||
$output = [
|
||||
'input' => $tipo_id,
|
||||
'tipo' => $tipo->toArray(),
|
||||
'eliminado' => $tipo->delete()
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function obtain(Request $request, Response $response, Factory $factory, Service $service): Response {
|
||||
$post = $request->getParsedBody();
|
||||
$valor = $service->get($post['fecha'], $post['moneda_id']);
|
||||
if ($valor === null) {
|
||||
return $this->withJson($response, ['input' => $post, 'tipo' => null, 'error' => 'No se encontró valor']);
|
||||
}
|
||||
$data = [
|
||||
'fecha' => $post['fecha'],
|
||||
'desde_id' => $post['moneda_id'],
|
||||
'hasta_id' => 1,
|
||||
'valor' => $valor
|
||||
];
|
||||
$tipo = TipoCambio::add($factory, $data);
|
||||
if ($tipo !== false and $tipo->is_new()) {
|
||||
$tipo->save();
|
||||
}
|
||||
$output = [
|
||||
'input' => $post,
|
||||
'tipo' => $tipo?->toArray()
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
}
|
139
api/common/Controller/TiposCategorias.php
Normal file
139
api/common/Controller/TiposCategorias.php
Normal file
@ -0,0 +1,139 @@
|
||||
<?php
|
||||
namespace Contabilidad\Common\Controller;
|
||||
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use ProVM\Common\Define\Controller\Json;
|
||||
use ProVM\Common\Factory\Model as Factory;
|
||||
use Contabilidad\Common\Service\TiposCambios as Service;
|
||||
use Contabilidad\TipoCategoria;
|
||||
|
||||
class TiposCategorias {
|
||||
use Json;
|
||||
|
||||
public function __invoke(Request $request, Response $response, Factory $factory, Service $service): Response {
|
||||
$tipos = $factory->find(TipoCategoria::class)->many();
|
||||
array_walk($tipos, function(&$item) use ($service) {
|
||||
$arr = $item->toArray();
|
||||
$arr['categorias'] = array_map(function($item) {
|
||||
return $item->toArray();
|
||||
}, $item->categorias());
|
||||
$arr['saldo'] = abs($item->saldo($service));
|
||||
$maps = ['activo', 'pasivo', 'ganancia', 'perdida'];
|
||||
foreach ($maps as $m) {
|
||||
$p = $m . 's';
|
||||
$t = ucfirst($m);
|
||||
$cuentas = $item->getCuentasOf($t);
|
||||
if ($cuentas === false or $cuentas === null) {
|
||||
$arr[$p] = 0;
|
||||
continue;
|
||||
}
|
||||
$arr[$p] = array_reduce($cuentas, function($sum, $item) use($service) {
|
||||
return $sum + $item->saldo($service, true);
|
||||
});
|
||||
}
|
||||
$item = $arr;
|
||||
});
|
||||
if ($tipos) {
|
||||
usort($tipos, function($a, $b) {
|
||||
return strcmp($a['descripcion'], $b['descripcion']);
|
||||
});
|
||||
}
|
||||
$output = [
|
||||
'tipos' => $tipos
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function add(Request $request, Response $response, Factory $factory): Response {
|
||||
$input = json_decode($request->getBody());
|
||||
$results = [];
|
||||
if (is_array($input)) {
|
||||
foreach ($input as $in) {
|
||||
$tipo = TipoCategoria::add($factory, $in);
|
||||
$results []= ['tipo' => $tipo?->toArray(), 'agregado' => $tipo?->save()];
|
||||
}
|
||||
} else {
|
||||
$tipo = TipoCategoria::add($factory, $input);
|
||||
$results []= ['tipo' => $tipo?->toArray(), 'agregado' => $tipo?->save()];
|
||||
}
|
||||
$output = [
|
||||
'input' => $input,
|
||||
'tipos' => $results
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function edit(Request $request, Response $response, Factory $factory, $tipo_id): Response {
|
||||
$tipo = $factory->find(TipoCategoria::class)->one($tipo_id);
|
||||
$output = [
|
||||
'input' => $tipo_id,
|
||||
'old' => $tipo->toArray()
|
||||
];
|
||||
$input = json_decode($request->getBody());
|
||||
$tipo->edit($input);
|
||||
$output['tipo'] = $tipo->toArray();
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function delete(Request $request, Response $response, Factory $factory, $tipo_id): Response {
|
||||
$tipo = $factory->find(TipoCategoria::class)->one($tipo_id);
|
||||
$output = [
|
||||
'input' => $tipo_id,
|
||||
'tipo' => $tipo->toArray(),
|
||||
'eliminado' => $tipo->delete()
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function categorias(Request $request, Response $response, Factory $factory, Service $service, $tipo_id): Response {
|
||||
$tipo = $factory->find(TipoCategoria::class)->one($tipo_id);
|
||||
$categorias = null;
|
||||
if ($tipo != null) {
|
||||
$categorias = $tipo->categorias();
|
||||
if ($categorias !== null) {
|
||||
array_walk($categorias, function(&$item) use ($service) {
|
||||
$arr = $item->toArray($service);
|
||||
$maps = ['activo', 'pasivo', 'ganancia', 'perdida'];
|
||||
foreach ($maps as $m) {
|
||||
$p = $m . 's';
|
||||
$t = ucfirst($m);
|
||||
$cuentas = $item->getCuentasOf($t);
|
||||
if ($cuentas === false or $cuentas === null) {
|
||||
$arr[$p] = 0;
|
||||
continue;
|
||||
}
|
||||
$arr[$p] = array_reduce($cuentas, function($sum, $item) use($service) {
|
||||
return $sum + $item->saldo($service, true);
|
||||
});
|
||||
}
|
||||
$item = $arr;
|
||||
});
|
||||
}
|
||||
}
|
||||
$output = [
|
||||
'input' => $tipo_id,
|
||||
'tipo' => $tipo?->toArray(),
|
||||
'categorias' => $categorias
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function balance(Request $request, Response $response, Factory $factory, Service $service): Response {
|
||||
$tipos = $factory->find(TipoCategoria::class)->many();
|
||||
$balance = array_reduce($tipos, function($sum, $item) use ($service) {
|
||||
$maps = ['activo', 'pasivo', 'ganancia', 'perdida'];
|
||||
foreach ($maps as $m) {
|
||||
$p = $m . 's';
|
||||
$t = ucfirst($m);
|
||||
if (!isset($sum[$p])) {
|
||||
$sum[$p] = 0;
|
||||
}
|
||||
$cuentas = $item->getCuentasOf($t);
|
||||
if ($cuentas === false or $cuentas === null) {
|
||||
continue;
|
||||
}
|
||||
$sum[$p] += array_reduce($cuentas, function($sum, $item) use($service) {
|
||||
return $sum + $item->saldo($service, true);
|
||||
});
|
||||
}
|
||||
return $sum;
|
||||
});
|
||||
return $this->withJson($response, $balance);
|
||||
}
|
||||
}
|
71
api/common/Controller/TiposCuentas.php
Normal file
71
api/common/Controller/TiposCuentas.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
namespace Contabilidad\Common\Controller;
|
||||
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use ProVM\Common\Define\Controller\Json;
|
||||
use ProVM\Common\Factory\Model as Factory;
|
||||
use Contabilidad\TipoCuenta;
|
||||
|
||||
class TiposCuentas {
|
||||
use Json;
|
||||
|
||||
public function __invoke(Request $request, Response $response, Factory $factory): Response {
|
||||
$tipos = $factory->find(TipoCuenta::class)->array();
|
||||
if ($tipos) {
|
||||
usort($tipos, function($a, $b) {
|
||||
return strcmp($a['descripcion'], $b['descripcion']);
|
||||
});
|
||||
}
|
||||
$output = [
|
||||
'tipos' => $tipos
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function show(Request $request, Response $response, Factory $factory, $tipo_id): Response {
|
||||
$tipo = $factory->find(TipoCuenta::class)->one($tipo_id);
|
||||
$output = [
|
||||
'input' => $tipo_id,
|
||||
'tipo' => $tipo?->toArray()
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function add(Request $request, Response $response, Factory $factory): Response {
|
||||
$input = json_decode($request->getBody());
|
||||
$results = [];
|
||||
if (is_array($input)) {
|
||||
foreach ($input as $in) {
|
||||
$tipo = TipoCuenta::add($factory, $in);
|
||||
$results []= ['tipo' => $tipo?->toArray(), 'agregado' => $tipo?->save()];
|
||||
}
|
||||
} else {
|
||||
$tipo = TipoCuenta::add($factory, $input);
|
||||
$results []= ['tipo' => $tipo?->toArray(), 'agregado' => $tipo?->save()];
|
||||
}
|
||||
$output = [
|
||||
'input' => $input,
|
||||
'tipos' => $results
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function edit(Request $request, Response $response, Factory $factory, $tipo_id): Response {
|
||||
$tipo = $factory->find(TipoCuenta::class)->one($tipo_id);
|
||||
$output = [
|
||||
'input' => $tipo_id,
|
||||
'old' => $tipo->toArray()
|
||||
];
|
||||
$input = json_decode($request->getBody());
|
||||
$tipo->edit($input);
|
||||
$output['tipo'] = $tipo->toArray();
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function delete(Request $request, Response $response, Factory $factory, $tipo_id): Response {
|
||||
$tipo = $factory->find(TipoCuenta::class)->one($tipo_id);
|
||||
$output = [
|
||||
'input' => $tipo_id,
|
||||
'tipo' => $tipo->toArray(),
|
||||
'eliminado' => $tipo->delete()
|
||||
];
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user