<?php

namespace App\Traits\Restock;

use App\Models\RestockItem;
use Illuminate\Database\Eloquent\Collection;

trait WithRestockItems
{
    public function loadRestockItems(): Collection
    {
        return $this->restockItems = RestockItem::query()
            ->currentUser()
            ->where('user_id', auth()->id())
            ->whereNull('restock_id')
            ->latest()
            ->get();
    }
}
