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

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more