participants shouldn't show ids either
This commit is contained in:
@@ -14,9 +14,12 @@ class DynamicResource extends BaseResource
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
$result = parent::toArray($request);
|
||||
if($this->ledgers){
|
||||
if ($this->ledgers) {
|
||||
$result['ledgers'] = LedgerResource::collection($this->ledgers);
|
||||
}
|
||||
if ($this->participants) {
|
||||
$result['participants'] = ParticipantResource::collection($this->participants);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ParticipantResource extends BaseResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return parent::toArray($request);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user