это проверка
Код: Выделить всё
public function updateAthlete(){
$pass = Hash::make($this->password);
$info = Athlete::find($this->athlete_id);
if($this->profile_photo_path){
File::delete('storage/' . $this->filePath);
$this->filePath = $this->profile_photo_path->store('AthletesProfile', 'public');
}
$this->validate([
'name' =>'required|max:70|min:3',
'name_fa' =>'required|max:70|min:3',
'name_pa' =>'required|max:70|min:3',
]);
$info->update([
'name' => $this->name,
'name_fa' => $this->name_fa,
'name_pa' => $this->name_pa,
]);
session()->flash('updated', 'Post successfully updated.');
}
Код: Выделить всё
Name in Farsi
@error('name_fa') {{ $message }} @enderror
Подробнее здесь: https://stackoverflow.com/questions/655 ... in-laravel