Creating records
If you want to make a crud
php artisan hoggar:make-crud
Put yours fields in the initField() method.
public function initField()
{
$this->form([
TextInput::make('name'),
]);
}
If you want to validate yours fields go to store() method.
public function store(Request $request)
{
$request->validate([
'name' => ['required'],
]);
// ...
}
If you want to hide the button "Create other" update the line.
public $hogarShowOther = false;
You can also modify a field just before putting to database.
public function store(Request $request)
{
// ...
$this->hogarRecord->name = 'robert';
$this->createRecord($request);
... //
}