add inventory and supply logic
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\Inventory;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class SupplierResource extends JsonResource
|
||||
{
|
||||
public function toArray($request): array
|
||||
{
|
||||
return [
|
||||
'id' => (int) ($this['id'] ?? 0),
|
||||
'name' => (string) ($this['name'] ?? ''),
|
||||
'email' => $this['email'] ?? null,
|
||||
'phone' => $this['phone'] ?? null,
|
||||
'address' => $this['address'] ?? null,
|
||||
'notes' => $this['notes'] ?? null,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user