rinvex / laravel-bookings

⚠️ [ABANDONED] Rinvex Bookable is a generic resource booking system for Laravel, with the required tools to run your SAAS like services efficiently. It's simple architecture, accompanied by powerful underlying to afford solid platform for your business.
MIT License
459 stars 143 forks source link

How to cancel booking #43

Closed tree1891 closed 3 years ago

tree1891 commented 4 years ago

I set canceled_at to now, but it occurs error when saving. Without any change, saving BookableBooking model occurs error. It seems 'options' member, It is null, but error is 'The options must be an array'

Omranic commented 3 years ago

Thank you for your patience. This feature currently not implemented. I'd be happy to consider any PRs that consolidate this feature. All PRs are welcome 😉

Added to the readme roadmap https://github.com/rinvex/laravel-bookings/blob/develop/README.md#roadmap

vesper8 commented 3 years ago

@Omranic so you have a canceled_at field and a bunch of scopes that returned canceled bookings, but no actual way to cancel a booking?

I also tried just doing

$booking->canceled_at = now();
$booking->save();

And it throws a 422 error The options must be an array

vesper8 commented 3 years ago

For anyone stumbling onto this, this works:

$booking->canceled_at = now();
$booking->forceSave();