Basic Usage
With Model Binding
Component Attributes
The input field name
Label text displayed above the input
Model instance for automatic value binding
Default value when no model or old input exists
Display validation errors below the input
Show or hide the label
Input placeholder text
Auto-generate placeholder from label
Mark field as required
Display label and input inline (horizontal layout)
Enable floating label style
Additional CSS classes for inline label
Additional CSS classes for inline input wrapper
Enable JavaScript validation error display
CSS framework override (bootstrap-5, material-admin-26)
Default Attributes
The Longitude component automatically applies these HTML attributes:- type:
number - step:
0.000001(6 decimal precision) - min:
-180(International Date Line West) - max:
180(International Date Line East)
Examples
With Validation
Inline Layout
Custom Placeholder
Latitude and Longitude Together
With Map Input
The Longitude component is commonly used alongside Map Input:Geospatial Integration
When using with Laravel Eloquent Spatial models:Notes
- The component extends the base Input component with
type="number" - Longitude values are constrained between -180° (West) and 180° (East)
- Precision is set to 6 decimal places (approximately 0.11 meters accuracy)
- Works seamlessly with the Map Input component for visual coordinate selection
- Supports model binding with Point objects from eloquent-spatial package