*/ protected $fillable = [ 'user_id', 'city', 'country', 'stripe_id', 'card_brand', 'card_last_four', ]; /** * The attributes that should be hidden for serialization. * * @var array */ protected $hidden = [ 'stripe_id', 'card_brand', 'card_last_four', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'trial_ends_at' => 'datetime', ]; public function isOnboardingCompleted() { return !((is_null($this->city) || trim($this->city) === '') || (is_null($this->country) || trim($this->country) === '')); } public function user(): BelongsTo { return $this->belongsTo(User::class); } public function events(): HasMany { return $this->hasMany(Event::class, 'organizer_id'); } public function reviews(): HasMany { return $this->hasMany(Review::class, 'organizer_id'); } }