/home/kueuepay/public_html/vendor/maatwebsite/excel/src/Concerns/WithConditionalSheets.php
<?php

namespace Maatwebsite\Excel\Concerns;

trait WithConditionalSheets
{
    /**
     * @var array
     */
    protected $conditionallySelectedSheets = [];

    /**
     * @param  string|array  $sheets
     * @return $this
     */
    public function onlySheets($sheets)
    {
        $this->conditionallySelectedSheets = is_array($sheets) ? $sheets : func_get_args();

        return $this;
    }

    /**
     * @return array
     */
    public function sheets(): array
    {
        return \array_filter($this->conditionalSheets(), function ($name) {
            return \in_array($name, $this->conditionallySelectedSheets, false);
        }, ARRAY_FILTER_USE_KEY);
    }

    /**
     * @return array
     */
    abstract public function conditionalSheets(): array;
}
Best Practice

Best Practices

To ensure a smooth integration process and optimal performance, follow these best practices:

  1. Use secure HTTPS connections for all API requests.
  2. Implement robust error handling to handle potential issues gracefully.
  3. Regularly update your integration to stay current with any API changes or enhancements.