cloudcake / laravel-approval

Attach an approval process to any model, approve and disapprove from any other model, for Laravel.
MIT License
140 stars 15 forks source link

Add reason field #21, and fix bug in disapproval method #22

Closed nagi1 closed 3 years ago

nagi1 commented 3 years ago

I found a bug in disapproval method, when disapprove a creating action, modifer_id will be null so applyModificationChanges() will be called on null.

I copied the same implementation from approve() method, and added to tests.

nagi1 commented 3 years ago

Please merge this as soon as you get this. Thanks.

stephenlake commented 3 years ago

Thanks for the contribution:

Please see https://www.php-fig.org/ - If you can fix these minor issues I'll gladly patch it with your addition, thank you for updating the readme and adding tests, you're a gem :gem:

nagi1 commented 3 years ago

Thanks for checking out the commit, I fix it. please merge because I'm using my forked branch.