PluginProbe
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution / 2.5.0
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution v2.5.0
2.5.0 2.4.0 2.3.0 2.2.5 2.2.0 2.1.2 2.1.1 trunk 1.10.0 1.10.01 1.10.02 1.5.0 1.5.01 1.5.02 1.5.1 1.5.10 1.5.20 1.5.21 1.5.22 1.5.23 1.5.24 1.5.25 1.6.0 1.7.0 1.7.1 All 34 releases
← All changes | app/Models/BookingActivity.php +14 -0 1.5.21 → 2.5.0 View file →
@@ -3,8 +3,10 @@
3 3 namespace FluentBooking\App\Models;
4 4
5 5 class BookingActivity extends Model
6 6 {
7 + const TYPE_NOTE = 'note';
8 +
7 9 protected $table = 'fcal_booking_activity';
8 10
9 11 protected $guarded = ['id'];
10 12
@@ -31,7 +33,19 @@
31 33
32 34 public function booking()
33 35 {
34 36 return $this->belongsTo(Booking::class, 'booking_id');
37 + }
38 +
39 + /**
40 + * Host notes only. System rows stay on the unscoped relation, so a note
41 + * query cannot rewrite an email log or a cancellation reason.
42 + *
43 + * @param \FluentBooking\Framework\Database\Query\Builder $query
44 + * @return \FluentBooking\Framework\Database\Query\Builder
45 + */
46 + public function scopeNotes($query)
47 + {
48 + return $query->where('type', self::TYPE_NOTE);
35 49 }
36 50
37 51 }