fix bill seeder

This commit is contained in:
omair saleh
2022-02-22 01:05:23 +08:00
parent 43f63cf24c
commit aa97a990eb
+2 -5
View File
@@ -16,11 +16,8 @@ class TransactionResource extends JsonResource
*/
public function toArray($request)
{
$booking = $this->type === TransactionType::BILL ? $this->owner->owner : $this->booking;
if(!$booking){
dd($this->type);
dd($this->owner);
}
$booking = (int) $this->type === TransactionType::BILL ? $this->owner->owner : $this->booking;
return [
'id' => $this->id,
'booking' => new BookingResource($booking),