Fields

Phone

Extends Text

  • has the same features

The Phone field is an extension of Text, which by default sets type=tel.

use MoonShine\Fields\Phone; //... public function fields(): array { return [ Phone::make('Phone') ]; } //...
use MoonShine\Fields\Phone;
 
//...
 
public function fields(): array
{
return [
Phone::make('Phone')
];
}
 
//...

To use a mask for the phone, use the mask('7 999 999-99-99') method