$this->id, 'name' => $this->name, 'email' => $this->email, 'status' => $this->status, 'created_at' => time_format($this->created_at), 'avatar' => image_resize($this->avatar), 'from' => $this->from, 'customer_group_name' => $this->customerGroup->description->name ?? '', 'edit' => admin_route('customers.edit', $this->id), 'delete' => admin_route('customers.destroy', $this->id), ]; $params = [ 'object' => $this, 'data' => $data, ]; return hook_filter('resource.customer', $params)['data']; } }