app/Http/Livewire/Form/ModelForm.php: use redirect()->with() helper instead of session()->flash()
This commit is contained in:
parent
436c0a1651
commit
4b86674ac7
1 changed files with 2 additions and 2 deletions
|
|
@ -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.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue