Archived
1
0
Fork 0
This repository has been archived on 2026-06-16. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
wow-raid-bingo/app/Http/Livewire/Form/CharacterForm.php

29 lines
560 B
PHP

<?php
namespace App\Http\Livewire\Form;
use App\Models\Character;
class CharacterForm extends ModelForm
{
/**
* Redirect after this route after record was created.
*/
public string $redirect_route = 'admin.character.index';
public function mount(Character $character)
{
$this->record = $character;
$this->exist = $character->exists;
}
/**
* Validation rules
*/
protected function rules()
{
return [
'record.name' => 'required|string|min:3|max:14',
];
}
}