beyondcode/laravel-vouchers

Custom User model

Closed this issue · 1 comments

Hi, I am using Laravel 5.8.29 and your package version 1.3

it seems it all works but I have a customer user model called WebMembers.

'user_model' => \App\WebMember::class,

All the exceptions are working but when I try to use for example

WebMember::find(112)->redeemCode('PA3V-SCUW-EQHL-57RE')

I get this error:

Column not found: 1054 Unknown column 'user_voucher.web_member_id' in 'on clause' (SQL: select exists(select * from web_membersinner joinuser_voucheronweb_members.id=user_voucher.web_member_idwhereuser_voucher.voucher_id= 3 anduser_voucher.user_id= 112) asexists)

but I don't know where the user_voucher.web_member_id is coming from as I am using the user_id that came with the example.

Thanks in Advance

user_voucher is the table , web_member_id is the column in that table , so check user_voucher table it it has the required column .