31 lines
628 B
PHP
31 lines
628 B
PHP
<?php
|
|
|
|
namespace App\Data;
|
|
|
|
use App\Contracts\OutputDataTransferObject;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
final readonly class OrderResponeDTO implements OutputDataTransferObject
|
|
{
|
|
public function __construct(
|
|
// TODO: Define your properties here
|
|
) {}
|
|
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function toArray(): array
|
|
{
|
|
return [
|
|
// TODO: Map properties to array
|
|
];
|
|
}
|
|
|
|
public static function fromModel(Model $model): OutputDataTransferObject
|
|
{
|
|
return new self(
|
|
// TODO: Map model data to properties
|
|
);
|
|
}
|
|
}
|