1
0
Fork 0

app/Http/Livewire/Form/ModelForm.php: use redirect()->with() helper instead of session()->flash()

This commit is contained in:
Henrik Hautakoski 2022-01-09 11:31:01 +01:00
parent 436c0a1651
commit 4b86674ac7

View file

@ -56,8 +56,8 @@ abstract class ModelForm extends Component
$this->record->save();
if ($this->isNew()) {
session()->flash('info', "{$this->getModelName()} was successfully created.");
return redirect()->route($this->redirect_route);
return redirect()->route($this->redirect_route)
->with('info', "{$this->getModelName()} was successfully created.");
}
$this->info("{$this->getModelName()} was successfully updated.");