no message

This commit is contained in:
StudioTem committed 2023-03-03 14:22:39 +01:00
1 parent 7320e82212
commit 8c79f045fc
6 files changed
+197 -2

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Services\Karat;
class Client extends Api {
public $code;
public $name;
public function __construct($code, $name) {
$this->code = $code;
$this->name = $name;
}
public static function all() {
$clients = self::getClients();
return collect(array_map(function($client) {
return new Client( $client['id'], $client['name']);
}, $clients));
}
public function toArray() {
return [
'code' => $this->code,
'name' => $this->name,
];
}
}