In the new version 9.31 we have Some of the new features.
- Model "without timestamps" feature https://github.com/laravel/framework/pull/44138
withoutTimestamps() method where updated_at will not change
$user = User::first();
// `updated_at` is not changed...
User::withoutTimestamps(
fn () => $user->update(['reserved_at' => now()])
);
- Model getAppends() method
added an accessor method to Model to get the accessors that are being appended to model arrays. This could be useful for custom model mappings
$model->getAppends();
- Str wrap static method https://github.com/laravel/framework/pull/44207
missing static Str::wrap() method, which was only available via Stringable
Str::wrap('-bar-', 'foo', 'baz'); // 'foo-bar-baz'
str('-bar-')->wrap('foo', 'baz'); // 'foo-bar-baz'
- Improve Blade compilation exception messages https://github.com/laravel/framework/pull/44134
I hope you enjoyed with me and to learn more about this release visit the sources and search more. I adore you who search for everything new.
Source :- https://laravel-news.com/laravel-9-31-0
Source :- https://www.youtube.com/watch?v=-g7BRU7L78c
Top comments (0)