pluck('name', 'id'); } /** * Get collection of vendors. * * @return \Illuminate\Database\Eloquent\Collection */ public function getVendorsList() { return Vendor::where('is_active', 1) ->orderBy('name') ->pluck('name', 'id'); } /** * Get list of customers and vendors. * * @return array */ public function getCustomersAndVendorsList() { return [ __('customer.customer') => Customer::orderBy('name')->pluck('name', 'id')->all(), __('vendor.vendor') => Vendor::orderBy('name')->pluck('name', 'id')->all(), ]; } }