'array', 'is_active' => 'boolean', 'license_expiry_date' => 'date', ]; /** * Get the user associated with this driver */ public function user(): BelongsTo { return $this->belongsTo(User::class); } /** * Get devices assigned to this driver */ public function devices(): HasMany { return $this->hasMany(Device::class); } /** * Scope for active drivers */ public function scopeActive($query) { return $query->where('is_active', true); } }