false, 'drive_forklift' => false, 'drive_car' => false, 'drive_3_5t' => false, 'drive_7_5t' => false, 'drive_12t' => false, ]; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ // phpcs:ignore 'user_id', 'has_car', 'drive_forklift', 'drive_car', 'drive_3_5t', 'drive_7_5t', 'drive_12t', ]; /** @var array */ protected $casts = [ // phpcs:ignore 'has_car' => 'boolean', 'drive_forklift' => 'boolean', 'drive_car' => 'boolean', 'drive_3_5t' => 'boolean', 'drive_7_5t' => 'boolean', 'drive_12t' => 'boolean', ]; /** * If the user wants to drive at the event */ public function wantsToDrive(): bool { return $this->drive_forklift || $this->drive_car || $this->drive_3_5t || $this->drive_7_5t || $this->drive_12t; } }