Skip to content

Commit b03f493

Browse files
authored
Update UpdateUsersTimezone.php (#75)
- Added the `tall-toasts` library - Updated README.md & timezone.php to reflect the changes
1 parent 7d330a4 commit b03f493

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ When the timezone has been set, we display a flash message, By default, is confi
121121

122122
[mckenziearts/laravel-notify](https://github.com/mckenziearts/laravel-notify) - `'flash' => 'mckenziearts'`
123123

124+
[usernotnull/tall-toasts](https://github.com/usernotnull/tall-toasts) - `'flash' => 'tall-toasts'`
125+
124126
To override this configuration, you just need to change the `flash` property inside the configuration file `config/timezone.php` for the desired package. You can disable flash messages by setting `'flash' => 'off'`.
125127

126128
### Overwrite existing timezones in the database

src/Listeners/Auth/UpdateUsersTimezone.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ private function notify(Location $geoip_info)
100100

101101
return;
102102
}
103+
104+
if (config('timezone.flash') == 'tall-toasts') {
105+
toast()->success($message)->pushOnNextPage();
106+
107+
return;
108+
}
103109
}
104110

105111
/**

src/config/timezone.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
|
1010
| Here you may configure if to use the laracasts/flash package for flash
1111
| notifications when a users timezone is set.
12-
| options [off, laravel, laracasts, mercuryseries, spatie, mckenziearts]
12+
| options [off, laravel, laracasts, mercuryseries, spatie, mckenziearts, tall-toasts]
1313
|
1414
*/
1515

0 commit comments

Comments
 (0)