You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,55 +53,55 @@ use Softon\SweetAlert\Facades\SWAL;
53
53
54
54
55
55
// Params: [Title,Text,Type,Options[]]
56
-
SWAL::message('Good Job','You have successfully Loged In!','info');
57
-
SWAL::message('Good Job','You have successfully Loged In!','error');
58
-
SWAL::message('Good Job','You have successfully Loged In!','success',['timer'=>2000]);
56
+
SWAL::message('Good Job','You have successfully logged In!','info');
57
+
SWAL::message('Good Job','You have successfully logged In!','error');
58
+
SWAL::message('Good Job','You have successfully logged In!','success',['timer'=>2000]);
59
59
60
-
// For All avialable options please refer the SweetAlert 2 Docs
60
+
// For All available options please refer the SweetAlert 2 Docs
61
61
62
62
```
63
63
64
64
Showing a Message to User using the swal helper function:-
65
65
```php
66
66
swal('Your Title','Text');
67
-
swal()->message('Good Job','You have successfully Loged In!','info');
68
-
swal()->message('Good Job','You have successfully Loged In!','error');
69
-
swal()->message('Good Job','You have successfully Loged In!','success',['timer'=>2000]);
67
+
swal()->message('Good Job','You have successfully logged In!','info');
68
+
swal()->message('Good Job','You have successfully logged In!','error');
69
+
swal()->message('Good Job','You have successfully logged In!','success',['timer'=>2000]);
70
70
```
71
71
72
72
Message Type Can be 'warning', 'error', 'success', 'info' and 'question'. Based on this there are some convinence function that can be used instead of the message method.:-
73
73
```php
74
74
// Params [Title, Text, Options]
75
-
swal()->warning('Good Job','You have successfully Loged In!',[]);
76
-
swal()->error('Good Job','You have successfully Loged In!',[]);
77
-
swal()->success('Good Job','You have successfully Loged In!',[]);
78
-
swal()->info('Good Job','You have successfully Loged In!',[]);
79
-
swal()->question('Good Job','You have successfully Loged In!',[]);
75
+
swal()->warning('Good Job','You have successfully logged In!',[]);
76
+
swal()->error('Good Job','You have successfully logged In!',[]);
77
+
swal()->success('Good Job','You have successfully logged In!',[]);
78
+
swal()->info('Good Job','You have successfully logged In!',[]);
79
+
swal()->question('Good Job','You have successfully logged In!',[]);
80
80
```
81
81
82
82
To show modal which will autoclose after few seconds:-
83
83
```php
84
-
swal()->autoclose(2000)->message('Good Job','You have successfully Loged In!','info');
85
-
swal()->autoclose(5000)->success('Good Job','You have successfully Loged In!');
84
+
swal()->autoclose(2000)->message('Good Job','You have successfully logged In!','info');
85
+
swal()->autoclose(5000)->success('Good Job','You have successfully logged In!');
86
86
```
87
87
88
88
To show a toast modal which will autoclose after few seconds:-
89
89
```php
90
-
swal()->toast()->autoclose(2000)->message('Good Job','You have successfully Loged In!','info');
90
+
swal()->toast()->autoclose(2000)->message('Good Job','You have successfully logged In!','info');
91
91
```
92
92
93
93
To change confirm button text:-
94
94
```php
95
-
swal()->button('Close Me')->message('Good Job','You have successfully Loged In!','info');
95
+
swal()->button('Close Me')->message('Good Job','You have successfully logged In!','info');
96
96
97
97
// Button Params [Button Text,Button Colour, SWAL Style Enable / Disable, Style Class for Buttons]
98
-
swal()->button('Close Me','#efefef',false,'btn btn-primary')->info('Good Job','You have successfully Loged In!');
98
+
swal()->button('Close Me','#efefef',false,'btn btn-primary')->info('Good Job','You have successfully logged In!');
99
99
```
100
100
101
101
To change position of the modal:-
102
102
```php
103
103
// Possible Posions : 'top', 'top-left', 'top-right', 'center', 'center-left', 'center-right', 'bottom', 'bottom-left', or 'bottom-right'
104
-
swal()->position('top')->message('Good Job','You have successfully Loged In!','info');
104
+
swal()->position('top')->message('Good Job','You have successfully logged In!','info');
105
105
```
106
106
107
107
You can chain any of these methods to combine the functionality:
0 commit comments