/home/brandsfa/.trash/app/Repositories/ShippingAddressRepository.php
<?php
namespace App\Repositories;
use App\Contracts\Repositories\ShippingAddressRepositoryInterface;
use App\Models\ShippingAddress;
use App\Traits\ProductTrait;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Pagination\LengthAwarePaginator;
class ShippingAddressRepository implements ShippingAddressRepositoryInterface
{
use ProductTrait;
public function __construct(
private readonly ShippingAddress $shippingAddress,
)
{
}
public function add(array $data): string|object
{
return $this->shippingAddress->create($data);
}
public function getFirstWhere(array $params, array $relations = []): ?Model
{
return $this->shippingAddress->with($relations)->where($params)->first();
}
public function getList(array $orderBy = [], array $relations = [], int|string $dataLimit = DEFAULT_DATA_LIMIT, int $offset = null): Collection|LengthAwarePaginator
{
// TODO: Implement getList() method.
}
public function getListWhere(array $orderBy = [], string $searchValue = null, array $filters = [], array $relations = [], int|string $dataLimit = DEFAULT_DATA_LIMIT, int $offset = null): Collection|LengthAwarePaginator
{
// TODO: Implement getListWhere() method.
}
public function update(string $id, array $data): bool
{
// TODO: Implement update() method.
}
public function delete(array $params): bool
{
// TODO: Implement delete() method.
}
}