Repository navigation
Replies: 4 comments 4 replies
2 replies
|
NB I can resolve the issue in these projects by publishing message.blade.php to the project, and changing the first line to:
|
0 replies
|
The actual cause turns out to the change in Laravel 13 to a default of 'serialization' => 'json' in config/session.php, which means the result of retrieving the 'flash_notification' from the session is always an array, even when a collection was set originally. |
1 reply
|
Should be fixed now in the latest version. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Something has happened with these new versions which makes the session storage behave differently.
Using the package's own message.blade.php partial causes an error, because the value returned from session('flash_notification') is different.
Before:

After:

The error is "Call to a member function toArray() on array (View: /Users/jonnott/Projects/Fusion/git/laravel/vendor/laracasts/flash/src/views/message.blade.php)"
This is because it's now already an array.
I don't know if the change has happened in this package or Laravel itself, but the only change here seems to have been the laravel/framework dependency bump, and there's been no change to Illuminate/Collections/Traits/EnumeratesValues.php's toArray() method in Laravel between v12 and v13.
Any thoughts anyone?
All reactions