From a82c2ed9fd77342fef5c47072f157777b6e77944 Mon Sep 17 00:00:00 2001 From: gqrdev Date: Tue, 7 May 2024 22:26:27 -0300 Subject: [PATCH 1/3] Added warning method --- src/building-your-app.md | 4 +++- src/stacks/livewire.md | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/building-your-app.md b/src/building-your-app.md index 071ae59..b00c13d 100644 --- a/src/building-your-app.md +++ b/src/building-your-app.md @@ -62,10 +62,12 @@ $request->session()->flash('flash.bannerStyle', 'success'); return redirect('/'); ``` -You may also instruct Jetstream to display the banner by invoking the `banner` or `dangerBanner` methods on a redirect response instance: +You may also instruct Jetstream to display the banner by invoking the `banner`, `warningBanner` or `dangerBanner` methods on a redirect response instance: ```php return redirect()->route('subscriptions')->banner('Subscription created successfully.'); +return redirect()->route('subscriptions')->warningBanner('Subscription pending approval.'); + return redirect()->route('subscriptions')->dangerBanner('Subscription cancellation failed.'); ``` diff --git a/src/stacks/livewire.md b/src/stacks/livewire.md index c38da4b..d9d9366 100644 --- a/src/stacks/livewire.md +++ b/src/stacks/livewire.md @@ -82,10 +82,12 @@ class ExampleComponent extends Component } ``` -To display a message to the user, invoke the `banner` or `dangerBanner` methods within a Livewire component method: +To display a message to the user, invoke the `banner`, `warningBanner` or `dangerBanner` methods within a Livewire component method: ```php $this->banner('Invoice paid.'); +$this->warningBanner('Payment pending approval.'); + $this->dangerBanner('Payment failed.'); ``` From ead6630baa09b1b341aae7092761d69b39e20dab Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 8 May 2024 14:05:20 -0400 Subject: [PATCH 2/3] Update building-your-app.md --- src/building-your-app.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/building-your-app.md b/src/building-your-app.md index b00c13d..aa12b06 100644 --- a/src/building-your-app.md +++ b/src/building-your-app.md @@ -62,12 +62,10 @@ $request->session()->flash('flash.bannerStyle', 'success'); return redirect('/'); ``` -You may also instruct Jetstream to display the banner by invoking the `banner`, `warningBanner` or `dangerBanner` methods on a redirect response instance: +You may also instruct Jetstream to display the banner by invoking the `banner`, `warningBanner`, or `dangerBanner` methods on a redirect response instance: ```php return redirect()->route('subscriptions')->banner('Subscription created successfully.'); - return redirect()->route('subscriptions')->warningBanner('Subscription pending approval.'); - return redirect()->route('subscriptions')->dangerBanner('Subscription cancellation failed.'); ``` From f84c4bc404abe096488361aede4aab54a20327bf Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 8 May 2024 14:06:27 -0400 Subject: [PATCH 3/3] Update livewire.md --- src/stacks/livewire.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/stacks/livewire.md b/src/stacks/livewire.md index d9d9366..b9f798c 100644 --- a/src/stacks/livewire.md +++ b/src/stacks/livewire.md @@ -82,12 +82,10 @@ class ExampleComponent extends Component } ``` -To display a message to the user, invoke the `banner`, `warningBanner` or `dangerBanner` methods within a Livewire component method: +To display a message to the user, invoke the `banner`, `warningBanner`, or `dangerBanner` methods within a Livewire component method: ```php $this->banner('Invoice paid.'); - $this->warningBanner('Payment pending approval.'); - $this->dangerBanner('Payment failed.'); ```