You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i've got the error "call to a member function has() on string", because library "errors" overwrites laravels $errors
Possible resolution is to add prexif to sweet alert "errors" variable, like in "toast_error", for example
return back()->with('modal_error', 'Error messagge');
return back()->with('modal_success', 'success messagge');
The text was updated successfully, but these errors were encountered:
Actually I didn't get your point because if you want SweetAlert catch your errors so you don't need to do anything except the enabling the middleware option through the .env file.
Register the middleware in web middleware groups by simply adding the middleware class
\RealRashid\SweetAlert\ToSweetAlert::class,
into the $middlewareGroups of your app/Http/Kernel.php file.
Set the SWEET_ALERT_AUTO_DISPLAY_ERROR_MESSAGES.env value to true to activate the automatic displaying for the validation error messages.
By default, this is not activated.
Description:
Hello.
When i use for example
return back()->with('errors', 'Error messagge');
and simultaneously use $errrors variable in form on blade templates like on official documentation
https://laravel.com/docs/7.x/validation#quick-displaying-the-validation-errors
@if ($errors->has('postcode')) <span class="invalid-feedback"> <strong>{{ $errors->first('postcode') }}</strong> </span> @endif
i've got the error "call to a member function has() on string", because library "errors" overwrites laravels $errors
Possible resolution is to add prexif to sweet alert "errors" variable, like in "toast_error", for example
return back()->with('modal_error', 'Error messagge');
return back()->with('modal_success', 'success messagge');
The text was updated successfully, but these errors were encountered: