bavix / laravel-wallet

It's easy to work with a virtual wallet
https://bavix.github.io/laravel-wallet/
MIT License
1.12k stars 222 forks source link

Question on working with the package #100

Closed rez1dent3 closed 5 years ago

rez1dent3 commented 5 years ago

@rez1dent3

First thanks for you laravel wallet plugin it's really awesome and helpful i just have some mis-understanding in some logic . for my case : 1- i have a hotel and this hotel have some units where i can book for customers . 2- i book the unit that means Reservation Model using trait Has HasWalletFloat 3- then i save the reservation in reservations table and in transactions table in the first status it become a withdraw . so in transactions table i have the morph relation with payable_type ( App\Reservation ) and payable_id ( the reservation id ) . 4- for now everything is working for me like a charm , but the issue am facing right now . 5- sometimes i want to add a transaction which is not related to any reservation ( ex: transaction made to plumber ) it's already a withdraw transaction but is not related to any reservation . 6- hopfully i have Team Model ( yeah am using spark ) how do i achieve something like i described in ( 5 ) that's my question

Thanks for your time reading this

Originally posted by @emad-sure in https://github.com/bavix/laravel-wallet/issues/99#issuecomment-529504364

rez1dent3 commented 5 years ago

@emad-sure I think you need a shopping cart. https://bavix.github.io/laravel-wallet/#/cart

Booking is a service (product), cleaning is also a product. Maybe I misunderstood you then correct me.

rez1dent3 commented 5 years ago

@emad-sure I will close this issue. Still have questions - write.