9
9
10
10
## Introduction
11
11
12
- Laravel Notify is a package that lets you add custom notifications to your project.
12
+ Laravel Notify is a package that lets you add custom notifications to your project.
13
13
A diverse range of notification design is available.
14
14
15
15
<p align =" center " >
@@ -27,7 +27,7 @@ A diverse range of notification design is available.
27
27
28
28
If you need Android version please try this package [ Aesthetic Dialogs] ( https://github.com/gabriel-TheCode/AestheticDialogs ) . Happy Coding 👨🏾💻
29
29
30
- ## Installation
30
+ ## Installation
31
31
32
32
You can install the package using composer
33
33
@@ -46,7 +46,7 @@ Then add the service provider to `config/app.php`. In Laravel versions 5.5 and b
46
46
```
47
47
48
48
You can publish the configuration file and assets by running:
49
-
49
+
50
50
``` sh
51
51
$ php artisan vendor:publish --provider=" Mckenziearts\Notify\LaravelNotifyServiceProvider"
52
52
```
@@ -57,12 +57,12 @@ Now that we have published a few new files to our application we need to reload
57
57
$ composer dump-autoload
58
58
```
59
59
60
- ## Usage
60
+ ## Usage
61
61
62
62
1 . Add styles links with ` @notifyCss `
63
63
2 . Add scripts links with ` @notifyJs `
64
64
3 . use ` notify() ` helper function inside your controller to set a toast notification for info, success, warning or error
65
- 4 . Include notify partial to your master layout ` @include('notify::messages ') `
65
+ 4 . Include notify partial to your master layout ` @include('notify::components.notify ') `
66
66
67
67
If you are on Laravel 7 or greater, you can use the tag syntax.
68
68
@@ -93,8 +93,8 @@ An complete example:
93
93
@notifyCss
94
94
</head>
95
95
<body>
96
-
97
-
96
+
97
+
98
98
@include('notify::messages')
99
99
// Laravel 7 or greater
100
100
<x:notify-messages />
@@ -104,15 +104,15 @@ An complete example:
104
104
```
105
105
106
106
### Type of notifications
107
-
107
+
108
108
Laravel Notify actually display 5 types of notifications
109
109
110
110
1 . ` toast ` notification, (The default notification for Laravel Notify)
111
111
112
112
``` php
113
113
notify()->success('Welcome to Laravel Notify ⚡️') or notify()->success('Welcome to Laravel Notify ⚡️', 'My custom title')
114
114
```
115
-
115
+
116
116
2 . ` connectify ` notification, example of basic usage
117
117
118
118
``` php
@@ -122,9 +122,9 @@ connectify('success', 'Connection Found', 'Success Message Here')
122
122
3 . ` drakify ` (😎) notification, displays an alert only
123
123
124
124
``` php
125
- drakify('success') // for success alert
125
+ drakify('success') // for success alert
126
126
or
127
- drakify('error') // for error alert
127
+ drakify('error') // for error alert
128
128
```
129
129
130
130
4 . ` smilify ` notification, displays a simple custom toast notification using the smiley (😊) emoticon
@@ -142,16 +142,16 @@ emotify('success', 'You are awesome, your data was successfully created')
142
142
#### Preset Notifications
143
143
144
144
If you have a specific notification that is used across multiple different places in your system, you can define it
145
- as a preset notification in your config file. This makes it easier to maintain commonly used notifications in one place.
145
+ as a preset notification in your config file. This makes it easier to maintain commonly used notifications in one place.
146
146
Read how to define preset messages in the [ Config] ( #config ) section below.
147
147
148
148
As an example, to use a preset notification you have defined called 'common-notification', use the following:
149
149
150
150
``` php
151
151
notify()->preset('common-notification')
152
- ```
152
+ ```
153
153
154
- You can override any of the values that are set in the config if you need to. For example, this could be useful if you
154
+ You can override any of the values that are set in the config if you need to. For example, this could be useful if you
155
155
have a common notification across, but you want to change the icon in one particular place that it's used without having
156
156
to manually write out a new notification.
157
157
0 commit comments