DEV Community

Morcos Gad
Morcos Gad

Posted on • Edited on

2 2

New Things Added - Laravel 9.8 Released

Let's get started quickly I found new things in Laravel 9.8 Released I wanted to share with you.

<input type="text" name="name" value="{{ old('name', $user->name) }}">

<input type="text" name="name" value="{{ old('name', $user) }}">
Enter fullscreen mode Exit fullscreen mode
public function boot()
{
    Blade::anonymousComponentNamespace('flights.bookings', 'flights');
}
Enter fullscreen mode Exit fullscreen mode

Here's an example of anonymous component usage

<x-flights::panel :flight="$flight" />
Enter fullscreen mode Exit fullscreen mode
  • Set Factory Method
// Before
EloquentModel::factory()->create(['name' => 'foo']);

// After
EloquentModel::factory()->set('name', 'foo')->create();

// Before
EloquentModel::factory()->someMethod()->create(['country' => 'NL']);

// After
EloquentModel::factory()->someMethod()->set('country', 'NL')->create();
Enter fullscreen mode Exit fullscreen mode
use PDOException;
use Psr\Log\LogLevel;

/**
 * A list of exception types with their corresponding custom log levels.
 *
 * @var array<class-string<\Throwable>, \Psr\Log\LogLevel::*>
 */
protected $levels = [
    PDOException::class => LogLevel::CRITICAL
];
Enter fullscreen mode Exit fullscreen mode

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-8-0
Source :- https://www.youtube.com/watch?v=_qVcZ6jJgr4

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay