DEV Community

Morcos Gad
Morcos Gad

Posted on • Edited on

5 4

New Things Added - Laravel 9.12 Released

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

method to the HTTP client that will throw an exception if the condition evaluates to true

// Throws RequestException
return Http::baseUrl('https://foo.bar')
       ->throwIf(true)
       ->get('not-found');

// Doesn't throw
return Http::baseUrl('https://foo.bar')
       ->throwIf(false)
       ->get('not-found');
Enter fullscreen mode Exit fullscreen mode

You can pass an array to the delay method to specify the delay amount for specific channels

$user->notify((new InvoicePaid($invoice))->delay([
    'mail' => now()->addMinutes(5),
    'sms' => now()->addMinutes(10),
]));
Enter fullscreen mode Exit fullscreen mode

You can also define a withDelay method on the notification class

/**
 * Determine the notification's delivery delay.
 *
 * @param  mixed  $notifiable
 * @return array
 */
public function withDelay($notifiable)
{
    return [
        'mail' => now()->addMinutes(5),
        'sms' => now()->addMinutes(10),
    ];
}
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-12-0
Source :- https://www.youtube.com/watch?v=NyI9GNI8MlI

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

👋 Kindness is contagious

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

Okay