Got it working using these for the functions:
public function purchased() {
return License::where('batch_id', $this->id)->whereNotNull('purchaser_id')->get();
}
public function qtyPurchased() {
return License::where('batch_id', $this->id)->whereNotNull('purchaser_id')->count();
}
(thanks mrogne)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community