From fe4495bed02fa2f0d89bb255244c81df517f298d Mon Sep 17 00:00:00 2001 From: Lee Stables Date: Mon, 8 Feb 2021 15:33:49 +0000 Subject: [PATCH 1/3] Add banner alerts example. Added additional finding thanks to @jasonlbeggs for pointing this out on Twitter. I think this is a good addition especially for new starters to Jetstream. I hope this can be added to the docs and thank you all for making such a great platform for us all to work on. --- 2.x/building-your-app.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/2.x/building-your-app.md b/2.x/building-your-app.md index 8563aaa..41f8042 100644 --- a/2.x/building-your-app.md +++ b/2.x/building-your-app.md @@ -46,3 +46,21 @@ When using Livewire, the team creation screen is defined by the `resources/views When team support is enabled, Jetstream includes a screen that allows users to manage the settings for their existing teams, such as changing the team name or inviting additional team members. You're free to add your own additional panels to these pages. To do so, you may simply edit the templates that define the page. When using Livewire, the team settings screen is defined by the `resources/views/teams/show.blade.php` Blade template. When using Inertia, this screen is rendered by the `resources/js/Pages/Teams/Show.vue` component. + +### Banner Alerts + +Jetstream includes a notification banner which can be seen when you publish the components, you may use the `vendor:publish` Artisan command: + +```bash +php artisan vendor:publish --tag=jetstream-views +``` + +Upon publishing, you will see a component `vendor/components/banner.blade.php` this holds the styles and core of the component. In your `layouts/app.blade.php` file you should add `` to render this component. +From here you can now use the notification within your Livewire components: + +```bash +session()->flash('flash.banner', 'Yay it works!'); +session()->flash('flash.bannerStyle', 'success'); + +returm $this->redirect('/'); +``` From 7069460721f9f9184220db7ae257339bc3d5da71 Mon Sep 17 00:00:00 2001 From: Lee Stables Date: Mon, 8 Feb 2021 16:05:07 +0000 Subject: [PATCH 2/3] Update building-your-app.md spelling mistake on the return statement --- 2.x/building-your-app.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.x/building-your-app.md b/2.x/building-your-app.md index 41f8042..160d085 100644 --- a/2.x/building-your-app.md +++ b/2.x/building-your-app.md @@ -62,5 +62,5 @@ From here you can now use the notification within your Livewire components: session()->flash('flash.banner', 'Yay it works!'); session()->flash('flash.bannerStyle', 'success'); -returm $this->redirect('/'); +return $this->redirect('/'); ``` From 77f7d09cb7f7d7cbb233c1ac6ac8bcb3636bd790 Mon Sep 17 00:00:00 2001 From: Lee Stables Date: Mon, 8 Feb 2021 16:05:26 +0000 Subject: [PATCH 3/3] Create building-your-app.md spelling mistake on the return statement